Function Channel.consumeOne
Consumes a single element off the queue.
T consumeOne();
T consumeOne() shared;
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.