IdrisDoc: System.Concurrency.Process

System.Concurrency.Process

send : ProcID msg -> msg -> Process msg Bool

Send a message to another process
Returns whether the send was unsuccessful.

run : Process msg x -> IO x
recvWithSender : Process msg (ProcID msg, msg)

receive a message, and return with the sender's process ID.

recvFrom : ProcID msg -> Process msg (Maybe msg)

Receive a message from specific sender - blocks if there is no message waiting
Fails if the sender is no longer running

recv : Process msg msg

Receive a message - blocks if there is no message waiting

myID : Process msg (ProcID msg)

Get current process ID

msgWaitingFrom : ProcID msg -> Process msg Bool

Return whether a message is waiting in the queue from a specific sender

msgWaiting : Process msg Bool

Return whether a message is waiting in the queue

create : Process msg () -> Process msg (ProcID msg)
data Process : (msgType : Type) -> Type -> Type

Type safe message passing programs. Parameterised over the type of
message which can be send, and the return type.

Lift : IO a -> Process msg a
data ProcID : Type -> Type
MkPID : Ptr -> ProcID msg