mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Ameliorate for race condition.
This commit is contained in:
parent
646c6b08f7
commit
5845ce0a39
@ -128,7 +128,7 @@ template <bool perform_automatically, bool start_immediately = true, typename Pe
|
||||
while(!should_quit_) {
|
||||
// Wait for new actions to be signalled, and grab them.
|
||||
std::unique_lock lock(condition_mutex_);
|
||||
while(actions_.empty()) {
|
||||
while(actions_.empty() && !should_quit_) {
|
||||
condition_.wait(lock);
|
||||
}
|
||||
std::swap(actions, actions_);
|
||||
|
Loading…
Reference in New Issue
Block a user