Do thread cleanup within the same thread context.

This commit is contained in:
rakshasa
2025-05-30 10:16:03 +02:00
committed by Jari Sundell
parent de6c48ca3f
commit 2d565d1c80
7 changed files with 119 additions and 24 deletions
+7 -4
View File
@@ -14,16 +14,19 @@
#include "rpc/scgi.h"
#include "rpc/parse_commands.h"
ThreadWorker::~ThreadWorker() {
if (m_scgi != nullptr)
m_scgi.load()->deactivate();
}
ThreadWorker::~ThreadWorker() = default;
void
ThreadWorker::init_thread() {
m_state = STATE_INITIALIZED;
}
void
ThreadWorker::cleanup_thread() {
if (m_scgi != nullptr)
m_scgi.load()->deactivate();
}
bool
ThreadWorker::set_scgi(rpc::SCgi* scgi) {
rpc::SCgi* expected = nullptr;