Use C++11 std::mutex and std::lock_guard instead of our RAII wrapper.
[cubemap] / thread.h
index 09e2754..46b6d39 100644 (file)
--- a/thread.h
+++ b/thread.h
@@ -4,6 +4,8 @@
 #include <signal.h>
 #include <pthread.h>
 
+#include <mutex>
+
 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;