X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=accesslog.h;h=b6ce61c36a7d87c6e21b67de05725d19296cd86c;hp=66be5a861543244824664a9778a70494bb0e84d9;hb=6cef2355000097dd9c762bb22ae0a3dd60371b76;hpb=136469d722a9986be6bbad68788619284919d876 diff --git a/accesslog.h b/accesslog.h index 66be5a8..b6ce61c 100644 --- a/accesslog.h +++ b/accesslog.h @@ -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 #include - +#include #include #include @@ -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 pending_writes; };