X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=image_input.h;h=02be497ff40e2dccee5f569a5be2e1e98a6ae4c5;hp=df25a9ff5eb3a89a4196aac75354d16846c90bec;hb=703e00da89118df9be0354dda621bed023e6030e;hpb=1cacf7d830e44a2e153ae9f15589666b5153e9b5 diff --git a/image_input.h b/image_input.h index df25a9f..02be497 100644 --- a/image_input.h +++ b/image_input.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -39,7 +40,10 @@ private: static std::mutex all_images_lock; static std::map> all_images; static std::map update_threads; - static volatile bool threads_should_quit; + + static std::mutex threads_should_quit_mu; + static bool threads_should_quit; // Under threads_should_quit_mu. + static std::condition_variable threads_should_quit_modified; // Signals when threads_should_quit is set. }; #endif // !defined(_IMAGE_INPUT_H)