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

Turn get_conn waiting queue into FIFO queue. #213

Merged
merged 4 commits into from
Nov 12, 2022
Merged

Turn get_conn waiting queue into FIFO queue. #213

merged 4 commits into from
Nov 12, 2022

Conversation

cloneable
Copy link
Contributor

@cloneable cloneable commented Nov 11, 2022

  • Use a BinaryHeap for Exchange::waiting.
  • Wrap GetConn wakers inside the new QueuedWaker.
  • Use the new QueueId which is an atomic u64 counter
    to prioritize the enqueued and re-enqueued wakers.

The AtomicU64 may theoretically wrap around, though should
not matter in practice. Should be documented.

Closes #212

@blackbeam blackbeam merged commit a51930f into blackbeam:master Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GetConn waiting queue as FIFO queue
2 participants