Skip to content
Discussion options

You must be logged in to vote

In principle you don't know that you will be shut down. Maybe the tasks are on different runtimes, and only one was shut down?

If you're going to just sleep until you get cancelled too, then std::future::pending().await would be better than a loop.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Lorak-mmk
Comment options

@Darksonn
Comment options

@Lorak-mmk
Comment options

@Darksonn
Comment options

Answer selected by Lorak-mmk
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