Skip to content

Does Tokio have a limit on the number of tasks #3649

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

You must be logged in to vote

No, there is no maximum number of tasks. If some of your tasks are not running, you should investigate if some of the other tasks are blocking the thread, as this can prevent tasks from running.

One thing I notice is that the continue in your else branch would lead to an infinite loop. You only hit the else branch when the channel is closed, so you should break from the loop in that case.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@xiashaohua
Comment options

@xiashaohua
Comment options

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