-
Effekt Library
- io/channel
- Node
- Sender
- Receiver
- channel
- send
- receive
- io/channel Jump to source: libraries/common/io/channel.effekt
- Node
[A, B] (this: Signal[A, B], rest: Ref[Option[Node[A, B]]]) - Sender
[A, B] - Receiver
[A, B] - channel
[A, B]: Tuple2[Sender[A, B], Receiver[A, B]] / {} - send
[A, B] (sender: Sender[A, B], value: A): B / {} - receive
[A, B] (receiver: Receiver[A, B], value: B): A / {}
Example usage: examples/stdlib/io/channel
Creates a new rendezvous channel and returns the receiving and the sending end. Every send must be matched by exactly one receive upon which two values are exchanged.
Sends a value to a channel and blocks until a receiver arrives.
Receives a value from a channel and blocks until a sender arrives.