Skip to content

Panic occurs when using tokio::task::spawn in Drop when running in a LocalSet #5794

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

You must be logged in to vote

A is equivalent to this:

let local_set = LocalSet::new();
let future = async_main(SpawnMethod::SpawnLocal, DropMethod::Spawn);
runtime.block_on(local_set.run_until(future));
drop(local_set);

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@acheronfail
Comment options

@acheronfail
Comment options

@Darksonn
Comment options

Answer selected by acheronfail
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