X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=server.h;h=edcdc83438b9a0322f382514601abf71e46f43ff;hp=4f964873b22503c54c1fa782c0785d453d5ba345;hb=e0b47eba2f5ec1aca1d02adc9fb4ffc7293d5c0f;hpb=3fd8650ccf3da3960a946d8ac9abc305aec399ce diff --git a/server.h b/server.h index 4f96487..edcdc83 100644 --- a/server.h +++ b/server.h @@ -19,6 +19,7 @@ class ClientProto; struct Stream; #define EPOLL_MAX_EVENTS 8192 +#define EPOLL_TIMEOUT_MS 20 #define MAX_CLIENT_REQUEST 16384 class CubemapStateProto; @@ -59,8 +60,9 @@ public: void set_encoding(const std::string &stream_id, Stream::Encoding encoding); private: - // Mutex protecting queued_data only. Note that if you want to hold both this - // and below, you will need to take before this one. + // Mutex protecting queued_add_clients and streams[..]->queued_data. + // Note that if you want to hold both this and below, + // you will need to take before this one. mutable pthread_mutex_t queued_data_mutex; // Deferred commands that should be run from the do_work() thread as soon as possible. @@ -74,7 +76,6 @@ private: // // Protected by . std::vector queued_add_clients; - std::map queued_data; // All variables below this line are protected by the mutex. mutable pthread_mutex_t mutex;