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

Method tryEnqueue

quantum/impl/quantum_io_queue_impl.h:201–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201inline
202bool IoQueue::tryEnqueue(ITask::Ptr task)
203{
204 if (!task)
205 {
206 return false; //nothing to do
207 }
208 //========================= LOCKED SCOPE =========================
209 SpinLock::Guard lock(_spinlock, lock::tryToLock);
210 if (lock.ownsLock())
211 {
212 doEnqueue(task);
213 }
214 return lock.ownsLock();
215}
216
217inline
218void IoQueue::doEnqueue(ITask::Ptr task)

Callers 1

postAsyncIoMethod · 0.45

Calls 1

ownsLockMethod · 0.45

Tested by

no test coverage detected