Skip to content

Async State Machine Worker API

The AsyncStateMachineWorker manages state machines that are configured to run in their own dedicated threads.

class automation.workers.state_machine.AsyncStateMachineWorker()

Worker that manages asynchronously executed state machines (each in its own thread).

run(self)

Starts a separate thread (SchedThread) for each registered machine.

join(self, machine)

Adds and starts a new machine dynamically at runtime.

add_machine(self, machine)

Adds a machine to be managed by this worker.

drop(self, machine)

Stops and removes a machine from execution.

stop(self)

Stops all managed threads.