-
-
Couldn't load subscription status.
- Fork 2.8k
Description
This issue is tracked by #7558, and it MUST be done before stabilizing the LocalRuntime.
What are the spawn_local methods?
tokio::task::spawn_local is used for spawn a !Send Future on the LocalSet or LocalRuntime, and there are several methods call tokio::task::spawn_local internally.
JoinSet::spawn_localJoinSet::spawn_local_onJoinMap::spawn_localJoinMap::spawn_local_onTaskTracker::spawn_localTaskTracker::spawn_local_on
What should we do?
We need to update the docs to clarify the behavior when the methods above are called on the LocalRuntime.
What is the behavior on the LocalRuntime?
Invoking these methods on the LocalRuntime doesn't panic.
What else do we need to do?
It would be better specifically reminding the authors of library crates to use these methods with caution, as calling them in their libraries may lead to their downstream panics, especially if their downstream uses a multi-threaded runtime.