An implementation of IScheduler that doesn't actually delay. This is useful for tests
which aren't interested in precise timing, but just want to be able to use a scheduler.
For more fine-grained control, use FakeScheduler.
public async Task Delay(TimeSpan delay, CancellationToken cancellationToken)
Returns a task that will complete "nearly immediately": there's no set delay, but the task
yields before completing, avoiding synchronous execution leading to subtle bugs. The cancellation
token passed in is observed, causing an exception if it's already canceled.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["This webpage provides documentation for the `NoOpScheduler` class, which is an implementation of `IScheduler` designed for testing purposes."],["`NoOpScheduler` does not introduce any actual delay, making it useful in tests where precise timing is not a concern, however it still does avoid synchronous execution."],["For more advanced control over delays, the `FakeScheduler` is recommended instead of `NoOpScheduler`."],["The `Delay` method within the `NoOpScheduler` class ignores the specified `TimeSpan` delay and completes nearly immediately, but still yields before completing."],["The `Delay` method does observe the cancellation token, throwing an exception if it is already canceled."]]],[]]