Std.Channel
9 public declarations
- channel
Int -> Std.Channel.Channel[T]A channel holding at most the given count of items.
- Channel
A queue with a bound, carrying values of one type between threads.
- ChannelError
Why a channel operation did not do what it was asked.
- close
&Std.Channel.Channel[T] -> Result[(), Std.Channel.ChannelError]Say that nothing more will be sent, so every receiver's loop can end.
- drain
&Std.Channel.Channel[T] -> Result[Array[T], Std.Channel.ChannelError]Every value still to come, in the order it was sent.
- fold
&Std.Channel.Channel[T] -> A -> fn(A, T) -> A -> Result[A, Std.Channel.ChannelError]Take values until the channel closes, combining them into one value.
- pending
&Std.Channel.Channel[T] -> Result[Int, Std.Channel.ChannelError]How many values are waiting.
- receive
&Std.Channel.Channel[T] -> Result[Option[T], Std.Channel.ChannelError]Take the next value, waiting while the channel is empty.
- send
&Std.Channel.Channel[T] -> T -> Result[(), Std.Channel.ChannelError]Put a value in, waiting while the channel is full.
