]> git.sesse.net Git - cubemap/blobdiff - stream.h
Use C++11 std::mutex and std::lock_guard instead of our RAII wrapper.
[cubemap] / stream.h
index 6c757a19ff29224f1049c2fc8554d4c24f36af0a..17df7f35dade3fc17b577e481031af24ffe2eb8c 100644 (file)
--- a/stream.h
+++ b/stream.h
@@ -9,6 +9,7 @@
 #include <sys/types.h>
 #include <sys/uio.h>
 #include <deque>
 #include <sys/types.h>
 #include <sys/uio.h>
 #include <deque>
+#include <mutex>
 #include <string>
 #include <vector>
 
 #include <string>
 #include <vector>
 
@@ -32,7 +33,7 @@ struct Stream {
        // Mutex protecting <queued_data> and <queued_data_last_starting_point>.
        // Note that if you want to hold both this and the owning server's
        // <mutex> you will need to take <mutex> before this one.
        // Mutex protecting <queued_data> and <queued_data_last_starting_point>.
        // Note that if you want to hold both this and the owning server's
        // <mutex> you will need to take <mutex> before this one.
-       mutable pthread_mutex_t queued_data_mutex;
+       mutable std::mutex queued_data_mutex;
 
        std::string url;
 
 
        std::string url;