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

fixes in main pool, make it work-stealing, add simple pool #11

Closed
wants to merge 23 commits into from

Conversation

c-cube
Copy link
Owner

@c-cube c-cube commented Oct 25, 2023

  • fix pool: on shutdown, finish reading from all queues
  • test: add dep on trace-tef; add new test for scheduling issues
  • wip: have only one condition in pool
  • fix pool: rework scheduler to use one condition
  • update tests a bit
  • add heavier test for a particular hangup in fork join
  • restore test
  • feat: add Simple_pool, with the naive single-queue implementation
  • refactor: move some common code to Suspend_
  • feat: add Ws_deque_
  • tests for ws_deque
  • perf ws_deque: implement shrinking and a push optim
  • feat pool: rewrite main pool to use work stealing
  • tests: run some tests on both Pool and Simple_pool
  • benchs: run with both pool and simple_pool

c-cube added 23 commits October 24, 2023 09:53
trying to expose that sometimes, some workers might be asleep while
others do several tasks, because they're sleeping on the "wrong" queue
there's a single blocking queue, and one WS_queue per worker. Scheduling
into the pool from a worker (e.g. via fork_join or explicitly) will push
into this WS queue; otherwise it goes into the main blocking queue.

Workers will always try to empty their local queue first, then try to
work steal, then block on the main queue.
@c-cube c-cube closed this Oct 26, 2023
@c-cube
Copy link
Owner Author

c-cube commented Oct 26, 2023

superseeded by #12

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.

1 participant