Channel.consumeOne

Consumes a single element off the queue.

This function will block if no elements are available. If the empty property is true, an exception will be thrown.

Note that it is recommended to use tryConsumeOne instead of a combination of empty and consumeOne due to being more efficient and also being reliable in a multiple-reader scenario.

  1. T consumeOne()
    struct Channel(T, size_t buffer_size = 100)
    T
    consumeOne
    ()
  2. T consumeOne()

Meta