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

feature: add a thread pool #7201

Merged
merged 1 commit into from
Mar 17, 2023
Merged

Conversation

rgrinberg
Copy link
Member

@rgrinberg rgrinberg commented Mar 1, 2023

Replace Scheduler.Worker with a background thread pool. The advantage of the thread pool is that we don't spawn 3 threads per RPC client and that the pool will be useful for off loading other syscalls from the main thread. The disadvantage is that we might get worse throughput if we have many RPC clients that are slow to service.

@rgrinberg rgrinberg force-pushed the ps/rr/feature__add_a_thread_pool branch from e081b59 to d24683b Compare March 1, 2023 02:23
@rgrinberg rgrinberg force-pushed the ps/rr/feature__add_a_thread_pool branch 5 times, most recently from cfa1339 to 288c1af Compare March 4, 2023 03:41
src/dune_engine/scheduler.mli Outdated Show resolved Hide resolved
src/dune_engine/scheduler.mli Outdated Show resolved Hide resolved
src/csexp_rpc/csexp_rpc.mli Show resolved Hide resolved
@rgrinberg rgrinberg force-pushed the ps/rr/feature__add_a_thread_pool branch from 288c1af to b70dbba Compare March 17, 2023 16:10
replace the current implementation with an unbounded number of workers

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

<!-- ps-id: f6f8a745-34f1-42fd-bf92-7ca2b6bde297 -->
@rgrinberg rgrinberg force-pushed the ps/rr/feature__add_a_thread_pool branch from b70dbba to 56b2f5e Compare March 17, 2023 16:22
@rgrinberg rgrinberg merged commit 8bea7ea into main Mar 17, 2023
@rgrinberg rgrinberg deleted the ps/rr/feature__add_a_thread_pool branch March 17, 2023 17:46
Copy link
Collaborator

@snowleopard snowleopard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!

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.

4 participants