module JoinCom: sig
.. end
Communication by asynchronous producers/consumers pairs
By convention, consumers consume data,
while producers produce data
module P: sig
.. end
Producers
module C: sig
.. end
Consumers
val connect : ('a P.t * 'a C.t * unit Join.chan) Join.chan
connect (prod,cons,k)
connnects producer prod
and consumer cons
.
The consumer will consume all production, until None
is sent.
Then, the consumer is closed and an unit message is sent to
continuation k
(in sequence).
The same occurs in case the consumer rejects an item.
Additionnaly, the producer is killed.