vibe.d beta banner
get vibe.d
0.8.5

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

Function Channel.empty

Determines whether there is more data to read.

bool empty() @property;

bool empty() shared @property;

This property is empty iff no more elements are in the internal buffer and close() has been called. Once the channel is empty, subsequent calls to consumeOne or consumeAll will throw an exception.

Note that relying on the return value to determine whether another element can be read is only safe in a single-reader scenario. Use tryConsumeOne in a multiple-reader scenario instead.

Authors

Sönke Ludwig

Copyright

© 2017-2019 RejectedSoftware e.K.

License

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