Table of Contents

Class EventQueueBase

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Non-generic base class for typed event queues. Allows the scheduler to reset all queues at tick start without knowing their generic type.

public abstract class EventQueueBase
Inheritance
EventQueueBase
Derived
Inherited Members

Remarks

Per-tick telemetry accumulators (peak depth, overflow count, produced/consumed counts) live here so the scheduler can read them without caring about the concrete EventQueue<T>. The accumulators are reset at tick start by Reset(); readers that want the previous tick's data must read before Reset runs (the scheduler reads them in its end-of-tick QueueTickEnd emission, then resets).

Constructors

EventQueueBase()

protected EventQueueBase()

Properties

Capacity

Maximum items per tick before Push overflows. Power of 2. Static schema fact — surfaced to the trace's Capacity for offline analysis (utilisation % against per-tick depth).

public abstract int Capacity { get; }

Property Value

int

Consumed

Total items returned by Drain calls during the current tick.

public uint Consumed { get; protected set; }

Property Value

uint

Count

Number of items currently in the queue.

public abstract int Count { get; }

Property Value

int

IsEmpty

True if the queue has no items.

public abstract bool IsEmpty { get; }

Property Value

bool

Name

Name of this event queue (for diagnostics).

public abstract string Name { get; }

Property Value

string

OverflowCount

Number of overflow events during the current tick — each is a Push against a full queue.

public uint OverflowCount { get; protected set; }

Property Value

uint

PeakDepth

Maximum number of items observed in the queue at any point during the current tick (after each Push).

public uint PeakDepth { get; protected set; }

Property Value

uint

Produced

Number of Push calls that succeeded during the current tick.

public uint Produced { get; protected set; }

Property Value

uint

QueueId

Stable identifier assigned by the runtime at registration. Used as QueueId and as the index into the QueueNameTable. Set by the runtime when the queue is registered with the scheduler; 0xFFFF means "unassigned" (queue created outside a scheduler context — telemetry not emitted for it).

public ushort QueueId { get; }

Property Value

ushort

Methods

Reset()

Resets the queue to empty. Called at the start of each tick. Also clears the per-tick telemetry accumulators.

public abstract void Reset()