-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before this patch, forwarding context cancellation to the workerpool tasks was difficult and required to spawn a goroutine to call wp.Close when the parent context was done. This patch introduce NewWithContext allowing callers to provide a parent context from which is derived the tasks context, removing the need to manually forward context cancellation. Signed-off-by: Alexandre Perrin <alex@isovalent.com>
- Loading branch information
Showing
2 changed files
with
64 additions
and
1 deletion.
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