diff --git a/Common/Net/HTTPServer.h b/Common/Net/HTTPServer.h index 445126e321..b6d1be7fc9 100644 --- a/Common/Net/HTTPServer.h +++ b/Common/Net/HTTPServer.h @@ -22,6 +22,10 @@ private: struct Worker { std::thread thread; // Set by the worker as its last act, read by whoever calls Run() next. + // It does look a bit fragile with the atomic inside a shared_ptr, but the way + // this is used, it should be fine. The atomic is only used to signal that the thread + // is done, and the shared_ptr is only used to keep the atomic alive until + // the thread is joined. std::shared_ptr> done; }; std::vector workers_;