-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Race conditions in cleanup goroutines could cause them to fail. As they are created every time a queue becomes non-empty, a single queue being worked can cause multiple goroutines to spawn for cleanup, and they could all get quite unlucky and never be able to perform their cleanup (particularly if a task gets left in that queue for a while after triggering multiple cleanup routines). Taken across a large number of queues, this can be an issue and leak memory unnecessarily. The implementation now recognizes that the presence of the "dependents" semaphore makes synchronous cleanup a safe procedure, simplifying logic and interactions between goroutines.
- Loading branch information
Showing
3 changed files
with
47 additions
and
47 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