(* swap-channel.sig *) (* swap channels *) signature SWAP_CHANNEL = sig (* swap channels *) type 'a swap_chan (* create a swap channel *) val swapChannel : unit -> 'a swap_chan (* swapEvt(ch, x) returns an event that, when synchonized with, swaps x with a thread that is synchronizing on an event of the form swapEvt(ch, y); the synchronization on swapEvt(ch, x) yields y, and the synchronization on swapEvt(ch, y) yields x *) val swapEvt : 'a swap_chan * 'a -> 'a CML.event end;