Commit e31160c0 authored by jan.koester's avatar jan.koester
Browse files

test

parent c7b6d5a3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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() {
+8 −0
Original line number Diff line number Diff line
@@ -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);

+8 −0
Original line number Diff line number Diff line
@@ -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() {
+4 −0
Original line number Diff line number Diff line
@@ -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() {
+2 −0
Original line number Diff line number Diff line
@@ -94,6 +94,8 @@ namespace netplus {

            void runEventloop(ULONG_PTR args=0);

            static void requestStop();

            virtual ~event();

            static inline std::atomic<bool> Restart{false};