Skip to main content

Module actor

Module actor 

Source

Structs§

AccumulatedResponses
Newtype wrapper around ValueOverlay<PythonResponseMessage> needed because PythonMessageKind is a #[pyclass] enum, requiring all variant fields to implement PyO3 traits. ValueOverlay is defined in another crate and does not implement PyClass.
CallbacksPending
Truthy while any callback is waiting on _callback_loop. _dispatch_loop yields to the event loop between messages while this is true: recv does not yield when a message is already queued, so a backlog of messages would otherwise starve _callback_loop.
DroppingPort
A port that drops all messages sent to it. Used when there is no response port for a message. Any exceptions sent to it are re-raised in the current actor.
Port
A port that sends messages to a remote receiver. Wraps an EitherPortRef with the actor instance needed for sending.
PyMeshRef
An opaque carrier so a MeshRef can ride in PythonMessage.refs across the Python boundary (the message getter out, the PicklingState ctor in).
PythonActor
An actor for which message handlers are implemented in Python.
PythonActorParams
PythonMessage
QueuedMessage
Message sent through the queue in queue-dispatch mode. Contains pre-resolved components ready for Python consumption.
QueuedSupervision
A supervision event enqueued for _callback_loop, or for a sync actor’s driver, which runs __supervise__ and reports the verdict with _handled or _raised. Dropping it without reporting (for example because an async loop was cancelled, sync cleanup won the claim, or the inbox was dropped) produces no verdict.
QueuedUndeliverable
An undeliverable message enqueued for _callback_loop, or for a sync actor’s driver, which runs _handle_undeliverable_message and reports the verdict with _handled or _raised. Dropping it without reporting (for example because an async loop was cancelled, sync cleanup won the claim, or the inbox was dropped) produces no verdict.
SupervisionOutcome
The verdict of __supervise__ on a QueuedSupervision, which the actor posts to itself.
UndeliverableOutcome
The verdict of _handle_undeliverable_message on a QueuedUndeliverable, which the actor posts to itself.

Enums§

ActorKind
Whether a Python actor is sync (it declares at least one endpoint, and every endpoint is a plain def) or async. Python’s _actor_kind decides it for a class spawned on a ProcMesh; every other construction route states it (SA-5, defined in monarch._src.actor.actor_mesh).
MeshRef
A serializable reference to a mesh (actor, proc, or host).
MethodSpecifier
PythonMessageKind
PythonResponseMessage
The payload of a single actor response, without rank information.
UnflattenArg

Functions§

register_python_bindings