(* multicast.sig *) (* a multicast channel is a way of sending messages to an arbitrary number of listeners via ports onto the multicast channel; when a message is sent to the multicast channel, it is available via all ports onto the multicast channel that existed when the message was sent *) signature MULTICAST = sig (* multicast channel *) type 'a mchan (* port on a multicast channel *) type 'a port (* create a multicast channel *) val mChannel : unit -> 'a mchan (* create a port onto a multicast channel *) val port : 'a mchan -> 'a port (* send a value to a multicast channel *) val multicast : 'a mchan * 'a -> unit (* turn a port into an event that, when synchronized on, will receive a value from the port; each time the event is synchronized on, a new value will be received *) val recvEvt : 'a port -> 'a CML.event (* copy p creates a new port that has the same state as p; i.e., exactly the same messages will be receivable via the new port as are receivable via the old port *) val copy : 'a port -> 'a port end;