Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
// fix bug where awaitTermination won't return even if all worker quit.
// https://en.cppreference.com/w/cpp/thread/condition_variable // follow what the STD told us to // "Even if the shared variable is atomic, it must be modified while owning the mutex to // correctly publish the modification to the waiting thread." // DEEP EXPLAINATION: // https://stackoverflow.com/questions/38147825/shared-atomic-variable-is-not-properly-published-if-it-is-not-modified-under-mut
- Loading branch information
1 parent
5c78c43
commit 9015681
Showing
2 changed files
with
19 additions
and
6 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