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