X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=thread.h;h=46b6d3952ff0cb262d24c077993d18b308ad3e9c;hp=09e2754dd4760ca598f25e145ec250be0473ffcc;hb=c020a9df307f6a5794336919fe5f2ac9a5a94e0a;hpb=a0fe013448d188b324c00383cfd91695d9d3d076 diff --git a/thread.h b/thread.h index 09e2754..46b6d39 100644 --- a/thread.h +++ b/thread.h @@ -4,6 +4,8 @@ #include #include +#include + struct timespec; // A thread class with start/stop and signal functionality. @@ -51,7 +53,7 @@ private: pthread_t worker_thread; // Protects should_stop_status. - pthread_mutex_t should_stop_mutex; + std::mutex should_stop_mutex; // If this is set, the thread should return as soon as possible from do_work(). bool should_stop_status;