[IPC] Better worker cleanup
This commit is contained in:
parent
0139465337
commit
67d963a0c8
@ -14,13 +14,12 @@ namespace Utils
|
||||
|
||||
Channel::~Channel()
|
||||
{
|
||||
{
|
||||
std::lock_guard<std::mutex> _(this->queueMutex);
|
||||
std::unique_lock<std::mutex> lock(this->queueMutex);
|
||||
this->terminateQueue = true;
|
||||
this->queueEvent.notify_all();
|
||||
}
|
||||
lock.unlock();
|
||||
|
||||
if(this->queueThread.joinable())
|
||||
if (this->queueThread.joinable())
|
||||
{
|
||||
this->queueThread.join();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user