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

common: add MPSC Queue #2612

Merged
merged 1 commit into from
Dec 29, 2023
Merged

common: add MPSC Queue #2612

merged 1 commit into from
Dec 29, 2023

Conversation

Riolku
Copy link
Contributor

@Riolku Riolku commented Dec 23, 2023

This queue is core to the new parallel hash index. It implements the design in this blog, which is also used by Rust. The design is quite simple, and producers are wait-free. The main disadvantage is it is non-blocking, but adding blocking pop() support is tricky, and currently not needed.

Copy link

codecov bot commented Dec 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (91945c6) 93.28% compared to head (99dbf7a) 93.28%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2612   +/-   ##
=======================================
  Coverage   93.28%   93.28%           
=======================================
  Files        1037     1037           
  Lines       38870    38870           
=======================================
  Hits        36258    36258           
  Misses       2612     2612           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Riolku Riolku mentioned this pull request Dec 23, 2023
src/include/common/mpsc_queue.h Outdated Show resolved Hide resolved
This queue is core to the new parallel hash index. It implements the
design in this [blog][1], which is also used by Rust. The design is quite
simple, and producers are wait-free. The main disadvantage is it is
non-blocking, but adding blocking pop() support is tricky, and currently
not needed.

  [1]: https://www.1024cores.net/home/lock-free-algorithms/queues/non-intrusive-mpsc-node-based-queue
@Riolku Riolku merged commit ce9cf4a into master Dec 29, 2023
14 checks passed
@Riolku Riolku deleted the mpsc-queue branch December 29, 2023 02:53
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.

2 participants