| Previous | Next
Thread::QueueProvides a thread-safe queue. Any number of threads can add elements to the end of the queue or remove elements from the head.
$q = new Thread::Queue Creates a new empty queue. Returns an object representing the queue.
$q->dequeue Removes and returns a scalar from the head of the queue. If the queue is empty,
$q->dequeue_nb Like
$q->enqueue list Adds the list of scalars, list, to the end of the queue.
$q->pending Returns the number of items remaining in the queue. |