Skip to content

Is there a list of what async primitive MUST be used with a tokio runtime? #6502

Answered by Darksonn
tisonkun asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tisonkun
Comment options

Answer selected by tisonkun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants