spawn -package:gi-glib
Create a new end point, fork a new thread, and run the specified IO
operation on that thread.
Returns the address of the new end point.
Spawn a mailbox using the specified
Buffer to store messages
Using
send on the
Output
- fails and returns False if the mailbox is sealed, otherwise
it:
- retries if the mailbox is full, or:
- adds a message to the mailbox and returns True.
Using
recv on the
Input:
- retrieves a message from the mailbox wrapped in Just if the
mailbox is not empty, otherwise it:
- retries if the mailbox is not sealed, or:
- fails and returns Nothing.
If either the
Input or
Output is garbage collected the
mailbox will become sealed.
spawn. Launch an external application. Specifically, it double-forks
and runs the
String you pass as a command to /bin/sh.
Note this function assumes your locale uses utf8.
Create a concurrent computation for the provided action, and return a
MVar which can be used to query the result.
Not on Stackage, so not searched.
Tiny library for concurrent computations
A morphism from the initial object i in cat to
a.
Examples
Start up a concurrent process and get a reference to it
Creates a new process to run the specified shell command. It does not
wait for the program to finish, but returns the
ProcessHandle.
Creates a new process to run the specified raw command with the given
arguments. It does not wait for the program to finish, but returns the
ProcessHandle.
Spawn a JS interpreter
Run NodeJS with "ghc-interp.js" loaded in. Then load GHCi.Server and
its deps (including the rts) and run GHCi.Server.defaultServer.
Asynchronous version of
spawn
(
spawn is defined in terms of
spawnAsync and
expect)
Spawn a new process, supplying it with a new
ReceivePort and
return the corresponding
SendPort.
Create a new typed channel, spawn a process on the local node, passing
it the receive port, and return the send port
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)