jon.recoil.org

Module Flambda2_algorithms.Channel

Channels

A channel is really just a reference, but we use separate sender and receiver types to indicate whether we expect to only write or only read to a specific reference.

type 'a sender
val send : 'a Flambda2_algorithms.Channel.sender -> 'a -> unit
type 'a receiver

Create a pair sender, receiver.

The value read (using recv) from the receiver is the last value that was sent (using send) to the sender, or the initial value provided to channel.