Expand description
Bounded command queue for off-main-thread mutations of ECS state.
- Capacity defaults to
DEFAULT_QUEUE_CAPACITY(8192) and is configurable viaCommandQueue::with_capacity. - Overflow drops the command, logs, and emits a
CommandQueueOverflowmessage. - The
TickStage::CommandDrainstage drains the queue on the main thread betweenInputandSystems.
Structs§
- Command
Queue - Producer-side ECS resource. Cloneable for sharing across worker threads.
- Command
Queue Overflow - Message emitted when
CommandQueue::try_pushreturnsErrbecause the queue is full. - Command
Receiver - Consumer-side ECS resource, registered as a non-Send resource since the drain runs on the main thread.
- Command
Registry - Resource holding the per-
TypeIdhandler table forCommand::Typed.
Enums§
- Command
- A deferred command applied during
TickStage::CommandDrain.
Constants§
- DEFAULT_
QUEUE_ CAPACITY - Default queue capacity. Override via
CommandQueue::with_capacity.
Functions§
- apply_
property_ commands - Drains
Command::SetPropertyandCommand::Typedentries from theCommandReceiverand applies them to thePropertyStore/CommandRegistryrespectively.
Type Aliases§
- Command
Handler Fn - Handler invoked when a
Command::Typedwith a matchingTypeIdis drained.