-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Zero pool size in tokio_threadpool::builder::Builder::new() #400
Comments
That is interesting! Could you file an issue on |
kpp
added a commit
to kpp/tokio
that referenced
this issue
Aug 8, 2018
This was referenced Aug 8, 2018
carllerche
pushed a commit
that referenced
this issue
Aug 8, 2018
facebook-github-bot
pushed a commit
to facebookarchive/mononoke
that referenced
this issue
Jan 8, 2020
…e from CLI Summary: The default behavior of `tokio::runtime::Runtime` is to use the number of CPUs as per `num_cpus::get().max(1)` (see [1], [2]). This is a reasonable default on physical systems with unlimited resource access, but in containerized environment Mononoke may be limited to a smaller number of CPUs than totally available on a system. Let's add the ability to override the size of the thread pool on the command line. [1] https://github.com/tokio-rs/tokio/blob/tokio-udp-0.1.2/tokio-threadpool/src/builder.rs#L93 [2] tokio-rs/tokio#400 Reviewed By: farnz Differential Revision: D19309494 fbshipit-source-id: 1fa4054b940bf225fac5f1a518f5cbb50d882fda
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi everyone,
I've discovered a strange behaviour on
mipsel-unknown-linux-gnu
. It seems like thenum_cpus::get()
can return zero in some cases. IMHO the threadpool builder should check this to avoid creating a pool with zero worker threads.The text was updated successfully, but these errors were encountered: