-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix waiter thread handle notification
The threads that wait on a state of a task future are stored in a collection. This collection got cleared when the task finished, and its state was set to RESULT_READY. This operation was incorrect, as if some threads wait on a notification about a new ancestor being added to a task, then it will never get notified, as its thread handle got purged from the collection. This gets fixed by not clearing the waiting thread collection in case the task finishes, so threads can get notified after finish. The thread handles that are only interested in the RESULT_READY event will still get removed not to keep them unnecessarily in the collection. AddAncestorBlockingWaitTaskTest was extended to test this scenario. This reliably happened when the str task finishes before the child starter task (plus) can start it. Related issue: #22
- Loading branch information
Showing
4 changed files
with
128 additions
and
29 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