9.6 Ports

The module Port contains procedures operating on ports.

IsPort

{Port.is +X ?B}

tests whether X is a port.

NewPort

{Port.new ?Xs ?Port}

returns a new port, together with its associated stream Xs.

Send

{Port.send +Port X}

sends X to the port Port: The stream pointed to by Port is unified with X|_ (in a newly created thread), and the pointer advances to the stream's new tail.

SendRecv

{Port.sendRecv +Port X Y}

sends the pair X#Y to the port Port: The stream pointed to by Port is unified with X#Y|_ (in a newly created thread), and the pointer advances to the stream's new tail.

The argument X is commonly used as message to be sent, while Y serves as reply to that message.


Denys Duchier, Leif Kornstaedt and Christian Schulte
Version 1.4.0 (20080702)