Identify if thread being created is a worker or blocking in thread_name_fn
#6646
Labels
A-tokio
Area: The main tokio crate
C-feature-request
Category: A feature request.
M-runtime
Module: tokio/runtime
Is your feature request related to a problem? Please describe.
No. It is something that will help us debug code identifying when blocking code that should always be executed with spawn_blocking is being executed by worker threads and blocking all the other futures.
Describe the solution you'd like
thread_name_fn
should receive a parameter to indicate if the thread being created is a working thread or a blocking thread.Alternatively we could have a method for worker threads and another one for blocking threads.
Describe alternatives you've considered
I am using this workaround to achieve the desired behavior, but it is not very robust.
Additional context
...
The text was updated successfully, but these errors were encountered: