Send a message on a channel. Returns whether the message was successfully
sent to the process at the other end of the channel. This will fail if
the process on the channel is no longer running.
This is unsafe because there is no type checking, so there must be
a protocol (externally checked) which ensures that the message send
is of type expected by the receiver.
Receive a message on a channel, with an explicit type.
Blocks if there is nothing to receive. Returns Nothing
if the
process on the channel is no longer running.
This is unsafe because there is no type checking, so there must be
a protocol (externally checked) which ensures that the message received
is of the type given by the sender.
Exit the thread immediately
Spawn a process in a new thread, returning the process ID
Returns Nothing
if there are not enough resources to create the new thread
Listen for incoming connections. If another process has initiated a
communication with this process, returns a channel
Create a channel which connects this process to another process
A PID is a process identifier, as returned by spawn
A Channel is a connection between two processes. Channels can be created
either using 'listen' to wait for an incoming connection, or 'connect'
which initiates a connection to another process.
Channels cannot (yet) be passed between processes.