Skip to content

blackbull.actor

blackbull.actor

Actor

Base class for all BlackBull Actors.

Each Actor owns an asyncio.Queue inbox and is expected to run as an asyncio.Task started by its Supervisor. Actors communicate exclusively via :meth:send; they never share mutable state.

Subclasses must override :meth:_handle.

run() async

Consume the inbox until the task is cancelled.

send(msg) async

Enqueue msg to this Actor's inbox (non-blocking).

Message dataclass

Base class for all Level A Actor messages.

Subclasses are plain dataclasses — add fields with standard dataclass syntax. The sender field is excluded from equality comparison so that message identity is determined by payload, not by which Actor sent it.