Replies: 1 comment 5 replies
-
If you want to give other work a chance to run, consider calling |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have some code that looks kinda like:
We also have other code elsewhere that uses rayon iterators (without sleeps).
I'm not sure how the work-stealing works, and I'm wondering if this sleep() can potentially clog up the rayon threadpool and cause the app to effectively hang, with low CPU utlization. That is the behavior we are seeing... app totally stalled, including all tokio tasks, but CPU is basically idle.
So is this a no-no? I haven't seen warnings not to use sleep() in rayon workers, but maybe there should be some?
or its fine?
Beta Was this translation helpful? Give feedback.
All reactions