X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fimage_input.h;h=ac3c519147d6d4d6f66ad4e2baffaffaabdf7a69;hb=c660c05323237bf118e6844c71703bf96be70d32;hp=02be497ff40e2dccee5f569a5be2e1e98a6ae4c5;hpb=9b7d691b4cc5db7dbfc18c82e86c1207fcac4722;p=nageru diff --git a/nageru/image_input.h b/nageru/image_input.h index 02be497..ac3c519 100644 --- a/nageru/image_input.h +++ b/nageru/image_input.h @@ -31,15 +31,16 @@ private: timespec last_modified; }; - std::string filename, pathname; + std::string pathname; std::shared_ptr current_image; static std::shared_ptr load_image(const std::string &filename, const std::string &pathname); static std::shared_ptr load_image_raw(const std::string &pathname); - static void update_thread_func(const std::string &filename, const std::string &pathname, const timespec &first_modified); + static void update_thread_func(); static std::mutex all_images_lock; - static std::map> all_images; - static std::map update_threads; + static std::map> all_images; // Under all_images_lock. + static bool update_thread_started; // Under all_images_lock. + static std::thread update_thread; // Under all_images_lock. static std::mutex threads_should_quit_mu; static bool threads_should_quit; // Under threads_should_quit_mu.