ReactiveUI.Primitives.Advanced.DispatchSequencerState
Coalescing engine shared by UI-thread sequencers: it batches dispatcher posts and shares delayed scheduling.
A sealed sequencer holds one inline and injects its platform post (and optionally scheduleDelayed)
delegates plus the cached drain callback; immediate work is queued and drained one batch per post.
Gets the sequencer's notion of current time.
Gets the sequencer's monotonic timestamp.
Initializes a new instance of the DispatchSequencerState struct using the shared thread-pool timer for delayed work.
public DispatchSequencerState(ISequencer owner, Func<Action, bool> post, Action drain, Action<IWorkItem, long> scheduleDelayed)
Initializes a new instance of the DispatchSequencerState struct.
Gets the delay from the sequencer's current time until the given monotonic timestamp.
Executes the work item on the current (dispatcher) thread unless it has already been cancelled.
Attempts to post a drain if queued work is waiting.
Runs one dispatcher batch.
Schedules a work item to be executed on the dispatcher.
Schedules a work item to be executed on the dispatcher at a monotonic timestamp.