Skip to content
Discussion options

You must be logged in to vote
  • If your pool is fully using all OS concurrency, then running the closure in an outside thread may be over-subscribing, especially if it's doing a lot of work on its own.
  • The closure may benefit from the pool's configured stack size, or associating itself with the pool's custom thread names for external debuggers, etc.
  • It may be faster to queue work from within the pool, although this is hard to quantify.
  • For ThreadPool::scope, it ensures that all contextual rayon calls (like parallel iterators) use that pool too.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vdrn
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