distributed-process-0.7.6: Cloud Haskell: Erlang-style concurrency in Haskell
Safe HaskellNone
LanguageHaskell2010

Control.Distributed.Process.Internal.Spawn

Synopsis

Documentation

spawn :: NodeId -> Closure (Process ()) -> Process ProcessId Source #

Spawn a process

For more information about Closure, see Control.Distributed.Process.Closure.

See also call.

spawnLink :: NodeId -> Closure (Process ()) -> Process ProcessId Source #

Spawn a process and link to it

Note that this is just the sequential composition of spawn and link. (The Unified semantics that underlies Cloud Haskell does not even support a synchronous link operation)

spawnMonitor :: NodeId -> Closure (Process ()) -> Process (ProcessId, MonitorRef) Source #

Like spawnLink, but monitor the spawned process

call :: Serializable a => Static (SerializableDict a) -> NodeId -> Closure (Process a) -> Process a Source #

Run a process remotely and wait for it to reply

We monitor the remote process: if it dies before it can send a reply, we die too.

For more information about Static, SerializableDict, and Closure, see Control.Distributed.Process.Closure.

See also spawn.

spawnSupervised :: NodeId -> Closure (Process ()) -> Process (ProcessId, MonitorRef) Source #

Spawn a child process, have the child link to the parent and the parent monitor the child

spawnChannel :: Serializable a => Static (SerializableDict a) -> NodeId -> Closure (ReceivePort a -> Process ()) -> Process (SendPort a) Source #

Spawn a new process, supplying it with a new ReceivePort and return the corresponding SendPort.