-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
A-tokioArea: The main tokio crateArea: The main tokio crateC-bugCategory: This is a bug.Category: This is a bug.M-runtimeModule: tokio/runtimeModule: tokio/runtimeT-docsTopic: documentationTopic: documentation
Description
Version
1.25.0
Platform
Windows, any version
Description
As written, the documentation for max_blocking_threads suggests it's only used for
This probably warrants a small disclaimer that setting this low-ish may be a good idea. In particular, on Windows, reading a pipe is a blocking read and will take away a blocking thread forever.
If you set max_blocking_threads
to a low value (e.g. in our case, in a test, we were setting it to 2), you can easily find yourself in a situation where spawn_blocking
just hangs forever, because all your blocking threads are waiting on a pair of idle pipes (stdout and stderr of a child process, in our case), which might be rather unexpected!
Metadata
Metadata
Assignees
Labels
A-tokioArea: The main tokio crateArea: The main tokio crateC-bugCategory: This is a bug.Category: This is a bug.M-runtimeModule: tokio/runtimeModule: tokio/runtimeT-docsTopic: documentationTopic: documentation