poll

poll(timeout = nil)
Instance Public methods

Remove the head of the queue.

If timeout is not given, remove and return the head 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 it there is no element available, waiting up to timeout seconds for an element to become available.

Raises:

becomes available after timeout seconds,

doc_ruby_on_rails
2015-06-20 00:00:00
Comments
Leave a Comment

Please login to continue.