-
In the docs for Q. Is there a way to configure, or otherwise limit, the max depth of the queue containing tasks awaiting the blocking thread pool? Thanks! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, the queue is unbounded. If you need custom limits on |
Beta Was this translation helpful? Give feedback.
No, the queue is unbounded. If you need custom limits on
spawn_blocking
tasks, then you can use aSemaphore
. See its examples for ideas. You should be able to usetry_acquire
to fail spawning when there are too many tasks.