diff --git a/src/Utils/IPC.cpp b/src/Utils/IPC.cpp index 5dd7d98d..3822db53 100644 --- a/src/Utils/IPC.cpp +++ b/src/Utils/IPC.cpp @@ -14,13 +14,12 @@ namespace Utils Channel::~Channel() { - { - std::lock_guard _(this->queueMutex); - this->terminateQueue = true; - this->queueEvent.notify_all(); - } + std::unique_lock lock(this->queueMutex); + this->terminateQueue = true; + this->queueEvent.notify_all(); + lock.unlock(); - if(this->queueThread.joinable()) + if (this->queueThread.joinable()) { this->queueThread.join(); }