mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 13:12:32 +00:00
Do thread cleanup within the same thread context.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user