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

Configurable num threads for tokio runtime? #2

Open
awaited-hare opened this issue May 21, 2020 · 1 comment
Open

Configurable num threads for tokio runtime? #2

awaited-hare opened this issue May 21, 2020 · 1 comment

Comments

@awaited-hare
Copy link

https://github.com/stjepang/smol/blob/3e899311b08fa01693e83560384e6cb8850e5573/src/context.rs seems to use num_cpu threads by default. It will probably be better if we can control the number of threads used (especially necessary when we want to run a program on a machine with more than a few dozen cores).

Similar issue in async-std: async-rs/async-std#774, async-rs/async-std#690.

I remember Tokio already has configurations like core_threads and max_threads, but currently there's no way to configure them in smol.

@ghost
Copy link

ghost commented Sep 5, 2020

This issue now belongs into async-compat, where the default number of threads is set to 1.

I'm not sure yet how to make the number of threads configurable... ideas welcome!

@ghost ghost transferred this issue from smol-rs/smol Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant