Skip to content

max_blocking_threads does not match the actual number #3415

Answered by Kestrer
omikuji asked this question in Q&A
Discussion options

You must be logged in to vote

I think this is because during runtime shutdown Tokio will repurpose worker threads to become blocking threads. If you add a std::thread::sleep(Duration::from_secs(10)); before the end of main, only two blocking tasks will be run at once.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@omikuji
Comment options

Answer selected by omikuji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants