diff --git a/source/tristanable/queue.d b/source/tristanable/queue.d index ca99527..c2ee0c9 100644 --- a/source/tristanable/queue.d +++ b/source/tristanable/queue.d @@ -91,6 +91,22 @@ public final class Queue queueLock.unlock(); } + public bool poll() + { + /* Status */ + bool status; + + /* Lock the queue */ + queueLock.lock(); + + status = !queue.empty(); + + /* Unlock the queue */ + queueLock.unlock(); + + return status; + } + /** * Attempts to coninuously dequeue the * head of the queue