Method in task · Channel compiler

Channel::recv

pub fn recv() -> Result<T, ChannelError>
Import
use task::{Channel};
Source: compiler/src/prelude/task.hy

Takes the oldest value, waiting while the channel is empty (a suspension point).

Called on a Channel value as value.recv(…).

Returns#

Result<T, ChannelError>

Errors#

Err(ChannelError::Closed) once the channel is closed and empty.

See also#

↑ ↓ navigate ↵ open