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

use main domain #14

Merged
merged 8 commits into from
Nov 8, 2023
Merged

use main domain #14

merged 8 commits into from
Nov 8, 2023

Conversation

c-cube
Copy link
Owner

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

currently we allocate n-1 new domains to run pools on, which means the main domain is ignored. However this means a core won't be fully used. This changes the state of things by making the main pool eligible for running worker threads as well.

we always keep a thread alive on the main domain as a worker for new
tasks, but other domains can still come and go to manage resources
properly in case a pool is started and used only for a short while.
The idea is that you might have APIs that want a runner, but the work is
too trivial to require a full actual thread pool. In this case use
`No_runner.runner` and calls to `run_async runner f` will turn into `f()`.
now the user can specify `num_threads`; if not provided a sensible
default is picked.
@c-cube c-cube force-pushed the wip-use-main-domain branch from 94a0f43 to 64f49b3 Compare October 29, 2023 22:30
@c-cube c-cube merged commit 80031c0 into wip-ws-2023-10-25 Nov 8, 2023
3 checks passed
@c-cube c-cube deleted the wip-use-main-domain branch November 8, 2023 14:42
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