// 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>
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;
};