public sealed class EffectSchedulerThe queue of effects waiting to run, drained at a defined point in the frame.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
This is the difference ADR-007 gives for not depending on SignalsDotnet, and it is worth restating: a game engine's UI has to flush effects at a precise point in the frame — after input, before layout, never mid-render — on a known thread, with a hard budget. An effect that ran the moment a signal was written would mutate the element tree while the renderer was walking it.
So writing a signal only ever queues. Flush is what runs anything, and the UI system calls it at two points of one frame and never during the draw: at the top of UiDocument.Update, after input and before layout, and again in its settle loop after every LayoutFinished, for the signals a layout handler wrote — a pooled list's rows are rebound there, and waiting for the next frame drew every scrolled row showing its previous item (#1406).
Fields and properties (6)
public static EffectScheduler DefaultThe scheduler an effect uses when it is not given one.
public int MaximumRunsPerEffectHow many times one effect may run in a single flush before it is suspended.
public int MaximumRunsPerFlushHow many effect runs one flush may perform before deferring the rest to the next.
public Action<string, Exception?>? SuspendedTold about every effect this scheduler suspends: where it was declared, and why.
public int PendingCountHow many effects are waiting to run.
public bool IsFlushingWhether a flush is running right now.
Methods (3)
public EffectScheduler(ILogger? logger = null)Creates a scheduler.
public int Flush()Runs every queued effect, and anything they queue in turn.
public void Post(Action work)Runs on the owning thread at the start of the next flush.
Used by (38)
- MaterialDocumentHelloUi
- AsyncComputedVixen.Ui.Reactive
- AsyncComputedTestsVixen.Ui.Reactive.Tests
- BackgroundTaskTestsVixen.Ui.Tests
- BrokenBindingTestsVixen.Ui.Tests
- BuildContextVixen.Ui
- CollectionSignalTestsVixen.Ui.Reactive.Tests
- CompositionTestsVixen.Ui.Tests
- DiagnosticsPanelTestsVixen.Ui.Controls.Tests
- EffectVixen.Ui.Reactive
- EffectPassTestsVixen.Ui.Tests
- EffectTestsVixen.Ui.Reactive.Tests
- EmitterTestsVixen.Ui.Markup.Tests
- GraphTestsVixen.Ui.Reactive.Tests
- HelpMarkupTestsVixen.Ui.Controls.Tests
- HotReloadTestsVixen.Ui.HotReload.Tests
- InertBindingTestsVixen.Ui.Tests
- LinkedSignalTestsVixen.Ui.Reactive.Tests
- MarkupTestsVixen.Ui.Controls.Tests
- ReactiveGraphVixen.Ui.Reactive
- RecentDocumentsVixen.Ui
- SheetVixen.Ui.Tests
- SignalDictionaryTestsVixen.Ui.Reactive.Tests
- SignalTestsVixen.Ui.Reactive.Tests
- StringsThreadingTestsVixen.Ui.Controls.Tests
- UiDocumentVixen.Ui
- UiWindowTitleVixen.Ui
- VxmlGeneratorTestsVixen.Ui.Markup.Generators.Tests
- EditorShellVixen.Editor.Ui
- GraphSelectionTestsVixen.Editor.NodeGraph.Tests
- LayerRowKeyTestsVixen.Editor.Texturing.Tests
- LayerStackEditingTestsVixen.Editor.Texturing.Tests
- LayerStackViewVixen.Editor.Texturing
- MarkupPanelTestsVixen.Editor.Profiler.Tests
- MilestoneE3TestsVixen.Editor.App.Tests
- NetworkViewTestsVixen.Editor.Debugger.Tests
- TaskCenterTestsVixen.Editor.Ui.Tests
- TextureGraphUndoTestsVixen.Editor.Texturing.Tests