-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify thread pool to use BlockingCollection
Instead of implementing a custom queue with custom locks, CustomThreadPool now uses a single BlockingCollection to add elements, and a fixed set of threads consuming elements concurrently using GetConsumingEnumerable. This fixes bug #60 and #61, at the expense of losing the ability of shutting down idle threads in the pool. We decreased the pool size from 10 to 5.
- Loading branch information
Showing
4 changed files
with
42 additions
and
207 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.