module Dynamic:sig
..end
type ('a, 'b)
t = {
|
enter : |
|
leave : |
|
wait : |
|
finished : |
Given a dynamic collector c
, defined as create comb y0
:
c
is informed of the future occurence of an event xi
,
by sending an unit message on c.enter()
.c
is informed of the occurence of event xi
by sending
a message c.leave(xi)
.c
is informed that no more event will occur by sending
a message c.finished()
.c.wait()
will return the combined result
comb x1 (comb x2 (... (comb xn y0)))
, once all the announced
events have occurred. Observe that at most one such call is allowed.val create : ('a -> 'b -> 'b) -> 'b -> ('a, 'b) t
create comb y0
returns a dynamic collector
of events of type 'a
, with combining function comb
and initial
result y0
.