-
I have a usecase where it is required to run on another thread... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
No, if you call that when you're already on a thread in the pool, it will add to that local queue. Thus that may run locally if you ever block on rayon and it looks for more work, or it may run elsewhere if another thread steals it. But even if we put that on the pool's global queue, there's a chance it could be picked up by the current thread as well. |
Beta Was this translation helpful? Give feedback.
-
I suppose if you |
Beta Was this translation helpful? Give feedback.
No, if you call that when you're already on a thread in the pool, it will add to that local queue. Thus that may run locally if you ever block on rayon and it looks for more work, or it may run elsewhere if another thread steals it. But even if we put that on the pool's global queue, there's a chance it could be picked up by the current thread as well.