int WorkerBridge_ExitHandler()

in src/mod_rivet_ng/rivet_worker_mpm.c [702:728]


int WorkerBridge_ExitHandler(rivet_thread_private* private)
{
    /* This is not strictly necessary, because this command will
     * eventually terminate the whole processes */

    /* This will force the current thread to exit */

    private->ext->keep_going = 0;

    if (!module_globals->single_thread_exit)
    {
        module_globals->mpm->skip_thread_on_exit = 1;

        /* We now tell the supervisor to terminate the Tcl worker thread pool */

        WorkerBridge_Finalize(private->r->server);

        exit(private->exit_status);
    }

    /*
     * If single thread exit is enabled we continue and let the
     * thread exit on its own interrupting the main loop
     */

    return TCL_OK;
}