ReadChannel: Interface providing asynchronous reading API.
- Companion
- object
Type members
Classlikes
Value members
Abstract methods
Concrete methods
read value and return future with
read value and return future with
- Some(value) if value is available to read
- None if stream is closed.
async version of read. Immediatly return future, which will contains result of read or failur with StreamClosedException in case of stream is closed.
async version of read. Immediatly return future, which will contains result of read or failur with StreamClosedException in case of stream is closed.
return F which contains sequence from first n elements.
return F which contains sequence from first n elements.
run code each time when new object is arriced. until end of stream is not reached
run code each time when new object is arriced. until end of stream is not reached
read value and return
read value and return
- Some(value) if value is available to read
- None if stream is closed.
should be called inside async block.
blocked read: if currently not element available - wait for one. Can be used only inside async block. If stream is closed and no values to read left in the stream - throws StreamClosedException
blocked read: if currently not element available - wait for one. Can be used only inside async block. If stream is closed and no values to read left in the stream - throws StreamClosedException