mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Fix variable name.
This commit is contained in:
parent
a7515fe156
commit
41af76bed8
@ -73,7 +73,7 @@ template <bool perform_automatically, typename Performer = int> class TaskQueue:
|
|||||||
[this] {
|
[this] {
|
||||||
ActionVector actions;
|
ActionVector actions;
|
||||||
|
|
||||||
while(!should_quit) {
|
while(!should_quit_) {
|
||||||
// Wait for new actions to be signalled, and grab them.
|
// Wait for new actions to be signalled, and grab them.
|
||||||
std::unique_lock lock(condition_mutex_);
|
std::unique_lock lock(condition_mutex_);
|
||||||
while(actions_.empty()) {
|
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.
|
/// The queue cannot be restarted; this is a destructive action.
|
||||||
void stop() {
|
void stop() {
|
||||||
if(thread_.joinable()) {
|
if(thread_.joinable()) {
|
||||||
should_quit = true;
|
should_quit_ = true;
|
||||||
enqueue([] {});
|
enqueue([] {});
|
||||||
if constexpr (!perform_automatically) {
|
if constexpr (!perform_automatically) {
|
||||||
perform();
|
perform();
|
||||||
@ -168,7 +168,7 @@ template <bool perform_automatically, typename Performer = int> class TaskQueue:
|
|||||||
ActionVector actions_;
|
ActionVector actions_;
|
||||||
|
|
||||||
// Necessary synchronisation parts.
|
// Necessary synchronisation parts.
|
||||||
std::atomic<bool> should_quit = false;
|
std::atomic<bool> should_quit_ = false;
|
||||||
std::mutex condition_mutex_;
|
std::mutex condition_mutex_;
|
||||||
std::condition_variable condition_;
|
std::condition_variable condition_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user