Repository navigation
Lock free, work stealing queue - #54
Draft
ptsouchlos wants to merge 1 commit into
Draft
ptsouchlos wants to merge 1 commit into
ptsouchlos wants to merge 1 commit into
Conversation
|
ion098
reviewed
Sep 4, 2024
Add a lock-free work-stealing deque (work_stealing_deque.h) for per-thread task queues, and rework the worker loop around it: - each thread keeps its own deque; enqueue_task() pushes worker tasks onto the owning thread's deque - the worker loop drains the global queue, then its own deque, then steals from other threads' deques while unassigned work remains - add work_stealing_deque::clear() so thread_pool::clear_tasks() can also empty the per-thread deques Add deque unit tests, and update the matrix multiplication benchmark and the mandelbrot example for the new API.
ptsouchlos
force-pushed
the
feature/lock-free-deque
branch
from
November 14, 2026 23:06
3b0b88f to
d5bbcd2
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




WIP 🚧
Adds a implementation of a Chase-Lev work stealing queue as described in the corresponding paper: "Correct and Efficient Work-Stealing for Weak Memory Models" and "Dynamic Circular Work-Stealing Deque" by Chase, Lev