-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove mutex from ReusableGoroutinesPool (#610)
I find it unsettling that we need to acquire a mutex (a concurrency primitive) to send data to a channel (another concurrency primitive). I think this achieves the same effect (we can stop the worker goroutines in a safe way) without having to mix them and leaving the main code path clear (just try to send a job, or run a new goroutine). Signed-off-by: Oleg Zaytsev <[email protected]>
- Loading branch information
Showing
1 changed file
with
11 additions
and
22 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