-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use a thread pool for blocking operations
So far, we have had a single thread per executor used for blocking operations. This has been fine to issue the odd syscall that couldn't go into the ring, but now that we have `spawn_blocking,` we've opened pandora's box. Users will submit all sorts of things in there, including long-running jobs that could stall the entire system. This commit introduces a static thread pool per executor instead. The pool is static for now, meaning the threads are created once and live for as long as the host executor does. Later on, we may want to be smarter and automatically up/downscale the pool depending on usage.
- Loading branch information
Showing
4 changed files
with
152 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters