Closed chabapok closed 9 months ago
Tokio uses blocking threads for fs operations (as some/most? kernels don't support async fs). We also use one for scope_and_block
. So we need two blocking threads.
Thanks for the info. Sorry for the unnecessary bug report...
I have the following minimally reproducible example:
And I use next
Cargo.toml
dependencies:This code prints
----1---
and----2---
, but not prints----3---
. So, program freezes on secondwrite_all
. If i trying to create runtime with.max_blocking_threads(2)
, program woks ok. Second call towrite_all
needs an extra thread? Why? It's a bug of theasync_scoped
crate or not? If I executewrite_all
without extraspawn
in async block, program works ok too.