Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 545 Bytes

readme.md

File metadata and controls

40 lines (28 loc) · 545 Bytes

hello

  • This is a complete item
  • This is an incomplete item
Click to expand blah-blah-blah


Query *QueryQueue::dequeue()
{
    QMutexLocker ml(&mutex_dequeue);

    Query *q=nullptr;

    if(!isEmpty()) {
        goto DEQ;
    }

    mutex_wait.lock();
    wait_condition.wait(&mutex_wait);
    mutex_wait.unlock();

    if(!isEmpty()) {
DEQ:
        rw_lock_queue.lockForWrite();
        q=queue.dequeue();
        rw_lock_queue.unlock();
    }

    return q;
}