Queue.wait

Blocks up until the timeout for an item to become available for dequeuing.

However, if the timeout is reached then an exception is returned.

  1. Item wait()
  2. Result!(Item, QixException) wait(Duration timeout)
    struct Queue
    Result!(Item, QixException)
    wait
    (
    Duration timeout
    )

Parameters

timeout Duration

the timeout

Return Value

Type: Result!(Item, QixException)

a Result containing the the dequeued item or a QixException if the timeout was exceeded

Meta