Manager.wait

Wait up until a specified maximum amount of time to dequeue an item from the queue given by the provided id

  1. Result!(Item, QixException) wait(QueueKey id)
  2. Result!(Item, QixException) wait(QueueKey id, Duration timeout)
    class Manager
    Result!(Item, QixException)
    wait
    (,
    Duration timeout
    )

Parameters

id QueueKey

the queue's id

timeout Duration

the maximum time to wait whilst blocking/waiting to dequeue an item from the queue

Return Value

Type: Result!(Item, QixException)

a Result either containing the dequeued item or a QixException if the id does not refer to a queue registered with this manager or the timeout was exceeded

Meta