]> git.sesse.net Git - cubemap/blobdiff - accesslog.h
Add support for deduplicating headers/short responses.
[cubemap] / accesslog.h
index 66be5a861543244824664a9778a70494bb0e84d9..b6ce61c36a7d87c6e21b67de05725d19296cd86c 100644 (file)
@@ -5,8 +5,9 @@
 // Server instances, we try not to let write() block too much, and rather do
 // all the I/O in a separate I/O thread.
 
+#include <pthread.h>
 #include <stdio.h>
-
+#include <mutex>
 #include <string>
 #include <vector>
 
@@ -29,11 +30,11 @@ public:
 private:
        virtual void do_work();
 
-       // The file we are logging to. If NULL, do not log.
+       // The file we are logging to. If nullptr, do not log.
        FILE *logfp;
        std::string filename;
 
-       pthread_mutex_t mutex;
+       std::mutex mu;
        std::vector<ClientStats> pending_writes;
 };