-
Most of Is there a list of what async primitive MUST be used with a tokio runtime? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The things in You mention the oneshot channel, but it does not depend on the runtime. Yes, it will access the Tokio's TLS storage to interact with cooperative scheduling, but this is optional, and the channel will still work if the TLS is unavailable. |
Beta Was this translation helpful? Give feedback.
The things in
tokio::sync
do not need a runtime, and everything else needs a Tokio runtime.You mention the oneshot channel, but it does not depend on the runtime. Yes, it will access the Tokio's TLS storage to interact with cooperative scheduling, but this is optional, and the channel will still work if the TLS is unavailable.