element_51.isolatedΒΆ

Run a job in a child process, so Stop can kill it and a crash stays there.

Module Attributes

KILL_AFTER

Seconds after Stop before the child is killed if it has not ended.

POLL

Seconds the parent waits for a message before it looks at the child.

Functions

check_importable(function)

Say why a child process could not import a job's class.

child_main(module, name, inputs, outbox, stop)

Import the job's class, run it and send what it does to outbox.

run_in_child(function, inputs, stop, sink)

Run a job in a child process and pass what it reports to sink.

Classes

Advanced(*, step)

Steps are done: step of them.

Began(*, total)

The job has this many steps.

Ended()

The job's code returned, or Stop ended it.

Failed(*, error)

The job's code raised; error is worded for a person.

Outbox(*args, **kwargs)

Where the child puts its messages.

Updated(*, fields)

New values for some outputs.

Exceptions

ChildFailedError(reason)

The job in the child process failed.