Class RuntimeSchedule
Fluent builder for constructing a runtime schedule — the public API game developers use to declare the Track → DAG → Phase → System hierarchy and
build a DagScheduler.
public sealed class RuntimeSchedule
- Inheritance
-
RuntimeSchedule
- Inherited Members
Remarks
A schedule owns three built-in Tracks — Engine-Pre, PublicTrack, Engine-Post — in that execution order. Apps declare their DAGs
on the Public track (schedule.PublicTrack.DeclareDag("Game").Add(...)) and may add further app tracks via DeclareTrack(string, params string[]); those slot into
the app region between Public and Engine-Post in declaration (execution) order. The engine declares its own DAGs (the Fence) on the Engine-Post track.
Declaring a DAG is mandatory — there is no default-DAG convenience.
Properties
EnginePostTrack
The built-in Engine-Post track — engine work after the app (currently the parallel Fence DAG).
public Track EnginePostTrack { get; }
Property Value
EnginePreTrack
The built-in Engine-Pre track — engine work before the app. Empty initially; declared for symmetry.
public Track EnginePreTrack { get; }
Property Value
PublicTrack
The built-in Public track — the app declares its DAGs here.
public Track PublicTrack { get; }
Property Value
Tracks
All tracks in execution order: Engine-Pre, Public, any app tracks (see DeclareTrack(string, params string[])), Engine-Post.
public IReadOnlyList<Track> Tracks { get; }
Property Value
Methods
Build(IResource, ILogger)
Validates the schedule and builds a DagScheduler.
public DagScheduler Build(IResource parent, ILogger logger = null)
Parameters
Returns
- DagScheduler
A ready-to-start DagScheduler.
Exceptions
- InvalidOperationException
A DAG contains a cycle, duplicate names, or invalid references.
Consumes(string, params EventQueueBase[])
Declares that a system consumes (reads from) the specified event queues.
public RuntimeSchedule Consumes(string systemName, params EventQueueBase[] queues)
Parameters
systemNamestringqueuesEventQueueBase[]
Returns
Create(RuntimeOptions)
Creates a new runtime schedule builder.
public static RuntimeSchedule Create(RuntimeOptions options = null)
Parameters
optionsRuntimeOptionsRuntime configuration. If null, defaults are used.
Returns
CreateEventQueue<T>(string, int)
Creates a typed event queue for inter-system communication.
public EventQueue<T> CreateEventQueue<T>(string name, int capacity = 1024)
Parameters
namestringDiagnostic name for the queue.
capacityintMaximum events per tick. Must be a power of 2.
Returns
- EventQueue<T>
Type Parameters
TEvent type.
DeclareTrack(string, params string[])
Declares an application Track and appends it to the app region — after PublicTrack and any previously declared app tracks, before the engine's Engine-Post track. Declaration order is execution order: every DAG of a track completes before any DAG of the next track begins (a coarse engine-level barrier).
public Track DeclareTrack(string name, params string[] tags)
Parameters
namestringTrack name — must be non-empty, unique across the schedule, and must not start with the reserved
Engine-prefix.tagsstring[]Optional open tag set for tooling. The reserved EngineTag is rejected.
Returns
- Track
The new track — declare DAGs on it via DeclareDag(string).
Exceptions
- InvalidOperationException
The schedule is already built, the name duplicates an existing track or uses the reserved prefix, or the tag set contains the engine tag.
Produces(string, params EventQueueBase[])
Declares that a system produces (writes to) the specified event queues.
public RuntimeSchedule Produces(string systemName, params EventQueueBase[] queues)
Parameters
systemNamestringqueuesEventQueueBase[]