send

abstract fun send(event: E): Boolean

Sends an event to the state machine for processing.

If the machine is not running, the event is ignored. If the machine is running, the event will be processed according to the configured event handlers for the current state.

This method is thread-safe and non-blocking. It can be safely called from coroutine contexts.

Return

True if the event was processed, false if ignored (machine not running)

Parameters

event

The event to send