MCPcopy Create free account
hub / github.com/bloomberg/quantum / isInterrupted

Method isInterrupted

quantum/impl/quantum_task_queue_impl.h:513–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511}
512
513inline
514bool TaskQueue::isInterrupted()
515{
516 if (_isEmpty && _isSharedQueueEmpty)
517 {
518 std::unique_lock<std::mutex> lock(_notEmptyMutex);
519 //========================= BLOCK WHEN EMPTY =========================
520 //Wait for the queue to have at least one element
521 _notEmptyCond.wait(lock, [this]()->bool { return !_isEmpty || !_isSharedQueueEmpty || _isInterrupted; });
522 }
523 return _isInterrupted;
524}
525
526inline
527TaskQueue::WorkItem

Callers

nothing calls this directly

Calls 1

waitMethod · 0.45

Tested by

no test coverage detected