The Molecule IO Monad
A process-level input channel.
A process-level output channel.
The base trait for all process types.
Process type with no input or output.
Process type with one output channel of type A
Process type with one input channel of type A
Process type with one input and one output.
A process-level input channel that can be released.
Type of the objects that are automatically shutdown when a process terminates.
Enrich a result channel returned within an IO with additional methods.
Enrich a Platftorm with additional methods.
Enrich a native producer channel.
Enrich a result channel with additional methods.
Enrich a return channel with additional methods.
Enrich an output of strings.
Process-level streaming input channel interface.
Trait used to wraps task submitted to an external executor inside monadic or streaming I/O.
Input that produces one value at a time which may result from selecting on multiple inputs.
Attach a resource to the resource control of this process such that it gets automatically closed once the process exits.
Attach a resource to the resource control of this process such that it gets automatically closed once the process exits.
a resource.
an action that returns the attached resource.
Call with current continuation.
Call with current continuation.
a function that takes the current continuation as argument.
an action that returns the parameter passed to call
.
Detach a resource from the resource control of this process.
Detach a resource from the resource control of this process.
a resource.
an action that returns the attached resource.
Enrich a result channel.
Enrich a producer channel.
Enrich a result channel.
Enrich a return channel.
Implicit conversion to 'enrich' an output of strings.
Action that gets the current platform.
Action that gets the current platform.
Return a Random.
Return a Random.
an action that returns a Random.
Execute a an action if the guard is true.
Execute a an action if the guard is true.
the guard.
the action to execute if b is true.
a unit action.
Action that logs a message.
Action that logs a message.
the message to log.
an action that logs a message.
Action that logs a debug message.
Action that logs a debug message.
the message to log.
an action that logs a debug message.
Action that logs an error message.
Action that logs an error message.
the message to log.
an action that logs a error message.
Action that logs a warning message.
Action that logs a warning message.
the message to log.
an action that logs a warning message.
Wait for the termination of a process and return its result.
Wait for the termination of a process and return its result.
the result channel.
Launch a process
Launch a process
an action that returns a process.
the result channel
Launch a process
Launch a process
an action that returns a process.
the result channel
Launch a process
Launch a process
a a process that returns a result of type R.
the return channel
unit
Launch a process
Launch a process
a a process that returns a result of type R.
the result channel
Close all the resources acquired by the action passed as argument once it terminates.
Close all the resources acquired by the action passed as argument once it terminates.
the action to manage.
Execute a list of interleaved actions and return their results as a list.
Execute a list of interleaved actions and return their results as a list. If one action fails all the other actions are terminated and a single signal corresponding to the exception is raised.
a list of actions.
the list of results. Results occur in the same as the order as the actions that produced them.
Execute a list of interleaved actions and return when they have all terminated.
Execute a list of interleaved actions and return when they have all terminated. Contrarily
to parl
, this action discards the intermediate results.
the list of actions.
a unit action that returns after all the actions have terminated.
Execute a list of interleaved actions and return their results as a list.
Execute a list of interleaved actions and return their results as a list.
a list of actions.
the list of results. Results occur in the same as the order as the actions that produced them.
Raise a signal as a user-level exception.
Raise a signal as a user-level exception.
the signal to raise.
nothing.
Read a value on an input within a specified timeout.
Read a value on an input within a specified timeout.
the input on which to read a value from
the timeout
the time unit of the delay parameter.
Some value if it can be read within the specified timeout, else none.
Close all the resources acquired in the current context.
Close all the resources acquired in the current context. Efficient loops with resource control can be written in terms of manage and resetCtx e.g. def forever(io:IO[Unit]):IO[Unit] = { def loop:IO[Unit] = io >> resetCtx() >> managedLoop manage(loop) }
the unit action
Suspend this process for a certain duration (non-blocking).
Suspend this process for a certain duration (non-blocking).
the duration of sleep.
the time unit.
a unit action that returns after the sleep period.
Fork an interleaved action.
Fork an interleaved action.
the action.
A result channel carrying the result of the action.
Execute a an action unless the guard is true.
Execute a an action unless the guard is true.
the guard.
the action to execute if b is false.
a unit action.
Use an output channel in the context of the process.
Use an output channel in the context of the process. The returned process-level output is attached as a resource to the process context, and will get closed automatically when the process terminates, unless the input is explicitly released before (see API of Output[A]).
a first-class output channel.
an action that returns the process-level channel.
Use an input channel in the context of the process.
Use an input channel in the context of the process. The returned process-level input is attached as a resource to the process context, and will get poisoned automatically when the process terminates, unless the input is explicitly released before (see API of Input[A]).
a first-class input channel.
an action that returns the process-level channel.
This package offers monadic process types and various combinators for monadic actions (see value members below).