Loading src/event/epoll.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -707,6 +707,14 @@ namespace netplus { } } void event::requestStop() { event::Running = false; if (WAKEUP_FD >= 0) { uint64_t val = 1; (void)write(WAKEUP_FD, &val, sizeof(val)); } } // Called from runEventloop() AFTER all worker threads have // joined — safe to acquire any lock. static void cleanupConnections() { Loading src/event/iocp.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -779,6 +779,14 @@ namespace netplus { } } void event::requestStop() { event::Running = false; if (g_wakeup_iocp) { for (int i = 0; i < g_wakeup_workers; ++i) PostQueuedCompletionStatus(g_wakeup_iocp, 0, 0, nullptr); } } void event::runEventloop(ULONG_PTR /*args*/) { init_state(this); Loading src/event/kqueue.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -813,6 +813,14 @@ namespace netplus { } } void event::requestStop() { event::Running = false; if (WAKEUP_PIPE[1] >= 0) { char c = 0; (void)write(WAKEUP_PIPE[1], &c, 1); } } // Called from runEventloop() AFTER all worker threads have // joined — safe to acquire any lock. static void cleanupConnections() { Loading src/event/poll.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -723,6 +723,10 @@ namespace netplus { } #endif void event::requestStop() { event::Running = false; } // Called from runEventloop() AFTER all worker threads have // joined — safe to acquire any lock. static void cleanupConnections() { Loading src/eventapi.h +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ namespace netplus { void runEventloop(ULONG_PTR args=0); static void requestStop(); virtual ~event(); static inline std::atomic<bool> Restart{false}; Loading Loading
src/event/epoll.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -707,6 +707,14 @@ namespace netplus { } } void event::requestStop() { event::Running = false; if (WAKEUP_FD >= 0) { uint64_t val = 1; (void)write(WAKEUP_FD, &val, sizeof(val)); } } // Called from runEventloop() AFTER all worker threads have // joined — safe to acquire any lock. static void cleanupConnections() { Loading
src/event/iocp.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -779,6 +779,14 @@ namespace netplus { } } void event::requestStop() { event::Running = false; if (g_wakeup_iocp) { for (int i = 0; i < g_wakeup_workers; ++i) PostQueuedCompletionStatus(g_wakeup_iocp, 0, 0, nullptr); } } void event::runEventloop(ULONG_PTR /*args*/) { init_state(this); Loading
src/event/kqueue.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -813,6 +813,14 @@ namespace netplus { } } void event::requestStop() { event::Running = false; if (WAKEUP_PIPE[1] >= 0) { char c = 0; (void)write(WAKEUP_PIPE[1], &c, 1); } } // Called from runEventloop() AFTER all worker threads have // joined — safe to acquire any lock. static void cleanupConnections() { Loading
src/event/poll.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -723,6 +723,10 @@ namespace netplus { } #endif void event::requestStop() { event::Running = false; } // Called from runEventloop() AFTER all worker threads have // joined — safe to acquire any lock. static void cleanupConnections() { Loading
src/eventapi.h +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ namespace netplus { void runEventloop(ULONG_PTR args=0); static void requestStop(); virtual ~event(); static inline std::atomic<bool> Restart{false}; Loading