Synced
PollingShellFrameDriver.RunAsync
Section titled “PollingShellFrameDriver.RunAsync”
- Advances frames until the callback stops the loop, cancellation is requested or a callback fails.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Shell
Declaration
Section titled “Declaration”public System.Threading.Tasks.ValueTask Inno.Shell.PollingShellFrameDriver.RunAsync(System.Func<bool> advanceFrame, System.Threading.CancellationToken cancellationToken)Parameters
Section titled “Parameters”Parameter advanceFrame: The owner-thread frame callback; false terminates the loop.
Parameter cancellationToken: Cancels before the next frame can execute.
Returns
Section titled “Returns”Completion when the callback stops; cancellation and callback failures propagate to the owner.
Exceptions
Section titled “Exceptions”Exception T:System.ArgumentNullException: The frame callback is null.
Exception T:System.OperationCanceledException: Cancellation was requested before a frame.