Flowdock
method

poll

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Queue
poll(timeout = nil) public

Remove the head of the queue.

If timeout is not given, remove and return the head of the queue if the number of available elements is strictly greater than the number of threads currently waiting (that is, don’t jump ahead in line). Otherwise, return nil.

If timeout is given, block if there is no element available, waiting up to timeout seconds for an element to become available.

Raises:

becomes available within timeout seconds,

Show source
Register or log in to add new notes.