Skip to content

tokio::time + tokio::test - weird behaviour #6993

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

You must be logged in to vote

It could be that you're using spawn_blocking for a background task that runs forever. If so, you'll need to change it to std::thread::spawn because Tokio assumes that you have ongoing work when there are spawn_blocking tasks, and so it will not auto-advance time.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@Darksonn
Comment options

@sebadob
Comment options

@Darksonn
Comment options

Answer selected by sebadob
@sebadob
Comment options

@sebadob
Comment options

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