Skip to content

Add #unshift, #pop and #pop? to Crystal::PointerLinkedList#16287

Merged
straight-shoota merged 2 commits intocrystal-lang:masterfrom
ysbaddaden:feature/add-unshift-and-pop-to-crystal-pointer-linked-list
Oct 30, 2025
Merged

Add #unshift, #pop and #pop? to Crystal::PointerLinkedList#16287
straight-shoota merged 2 commits intocrystal-lang:masterfrom
ysbaddaden:feature/add-unshift-and-pop-to-crystal-pointer-linked-list

Conversation

@ysbaddaden
Copy link
Collaborator

Adds methods to add and remove from any end of the list, while the current implementation only allows a FIFO behavior (add to tail, remove from head).

For example in the fdlock pull request I'd like to add new waiters to tail but add woken waiters to head (to give them some edge).

@ysbaddaden
Copy link
Collaborator Author

This patch has been sitting in a local branch for many months, now 😅

@straight-shoota straight-shoota added this to the 1.19.0 milestone Oct 28, 2025
@straight-shoota straight-shoota merged commit 1d83966 into crystal-lang:master Oct 30, 2025
39 checks passed
@ysbaddaden ysbaddaden deleted the feature/add-unshift-and-pop-to-crystal-pointer-linked-list branch October 30, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants