if (mQueueCondition == QC_Empty)
{
mBufferTransferLock.unlock();
mBufferEmptyVariable.wait(conditionLock,[this]{
bool res;
this->mBufferTransferLock.lock();
res = this->mQueueCondition != QC_Empty || !mIn.isConnected();
this->mBufferTransferLock.unlock();
return res;
});
mBufferTransferLock.lock();
if (this->mQueueCondition == QC_Empty)
{
mBufferTransferLock.unlock();
break;
}
}