mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-09 05:25:01 +00:00
Fix construction order.
This commit is contained in:
@@ -84,10 +84,13 @@ template <typename Performer> class AsyncUpdater {
|
|||||||
std::unique_ptr<ActionVector> actions_;
|
std::unique_ptr<ActionVector> actions_;
|
||||||
|
|
||||||
// Necessary synchronisation parts.
|
// Necessary synchronisation parts.
|
||||||
std::thread performer_thread_;
|
std::atomic<bool> should_quit = false;
|
||||||
std::mutex condition_mutex_;
|
std::mutex condition_mutex_;
|
||||||
std::condition_variable condition_;
|
std::condition_variable condition_;
|
||||||
std::atomic<bool> should_quit = false;
|
|
||||||
|
// Ensure the thread isn't constructed until after the mutex
|
||||||
|
// and condition variable.
|
||||||
|
std::thread performer_thread_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user