vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

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.

Authors

Sönke Ludwig

Copyright

© 2017-2019 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.