Class
AppDispatcher
ConsoleMonster.Interactive
A bounded mailbox. Producers never execute UI callbacks; the app thread drains them with a per-tick budget.
Inheritance
- object
- AppDispatcher
Usage
Explore 2 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 2
- Property ConsoleAppOptions.Dispatcher
- Property GridOptions.Dispatcher
Constructors
public AppDispatcher(int capacity = 512) #Creates a mailbox with an explicit finite capacity.
Parameters
- capacity int = 512
Methods
public void Dispose() #Rejects future work and drops callbacks whose app no longer exists.
public int Drain(int budget = 64) #Runs at most budget callbacks on the caller's app thread, outside the mailbox lock.
Parameters
- budget int = 64
Returns
intpublic bool TryPost(Action callback) #Attempts to queue a callback. Returns false when full or disposed.
Parameters
- callback System.Action
Returns
bool