1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-25 16:31:42 +00:00

Fix variable name.

This commit is contained in:
Thomas Harte 2022-07-15 15:13:03 -04:00
parent a7515fe156
commit 41af76bed8

View File

@ -73,7 +73,7 @@ template <bool perform_automatically, typename Performer = int> class TaskQueue:
[this] {
ActionVector actions;
while(!should_quit) {
while(!should_quit_) {
// Wait for new actions to be signalled, and grab them.
std::unique_lock lock(condition_mutex_);
while(actions_.empty()) {
@ -127,7 +127,7 @@ template <bool perform_automatically, typename Performer = int> class TaskQueue:
/// The queue cannot be restarted; this is a destructive action.
void stop() {
if(thread_.joinable()) {
should_quit = true;
should_quit_ = true;
enqueue([] {});
if constexpr (!perform_automatically) {
perform();
@ -168,7 +168,7 @@ template <bool perform_automatically, typename Performer = int> class TaskQueue:
ActionVector actions_;
// Necessary synchronisation parts.
std::atomic<bool> should_quit = false;
std::atomic<bool> should_quit_ = false;
std::mutex condition_mutex_;
std::condition_variable condition_;