-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
A-tokioArea: The main tokio crateArea: The main tokio crateC-feature-requestCategory: A feature request.Category: A feature request.M-runtimeModule: tokio/runtimeModule: tokio/runtime
Description
When using LocalRuntime
, it's possible to guarantee that certain callbacks on the runtime builder only run on the current thread. So we should provide non-Send versions of those callbacks.
Note that we should have tests for this. For example, it's very important that on_thread_park
only runs inside Runtime::block_on
calls. If it also runs in Handle::block_on
calls, then this logic does not work. There must be tests for that before non-Send versions of the callbacks can be accepted.
ultimaweapon
Metadata
Metadata
Assignees
Labels
A-tokioArea: The main tokio crateArea: The main tokio crateC-feature-requestCategory: A feature request.Category: A feature request.M-runtimeModule: tokio/runtimeModule: tokio/runtime