Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PriorityQueue #27

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Add PriorityQueue #27

merged 1 commit into from
Mar 12, 2024

Conversation

trowski
Copy link
Member

@trowski trowski commented Mar 12, 2024

This adds a priority queue implementation which we've copied in some form or another to use as a queue for timeouts. We're currently using a simplified version in amphp/http-server and I've used similar code in some personal and work projects. @bwoebi would now like to use this in amphp/quic without having to copy the implementation yet again, so I'm proposing we add it here.

This queue implementation provides ordering of array-keys based on an updatable priority. These array keys may then be used with a separate map to reference any other value, such as an object.

@trowski trowski merged commit 375ef5b into 2.x Mar 12, 2024
8 checks passed
@trowski trowski deleted the priority-queue branch March 12, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant