Struct rain_task::Executor[][src]

pub struct Executor { /* fields omitted */ }

The executor event loop and the set of registered tasks.

Methods

impl Executor
[src]

Create a executor based on env variables RAIN_EXECUTOR_ID and RAIN_EXECUTOR_SOCKET and working dir in the current directory. See also Executor::with_params.

Panics when either env variable is missing or invalid.

Creates a Sbgovernor with the given attributes. Note that the attributes are only recorded at this point and no initialization is performed.

Register task function.

The provided function must accept a list of inpts and outputs, expanding them manually. For functions accepting individual inputs and outputs, see the macro register_task!. The accepted function type is equivalent to 'static + TaskFn.

Panics when a task with the same name has been registered previously.

Run the executor loop, connecting to the governor, registering and handling requests until the connection is closed. May be only called once.

Panics on any error outside of the task functions. See README.md for rationale.

Auto Trait Implementations

impl Send for Executor

impl Sync for Executor