Skip to content

Scheduler class

Defined in

Namespace: System.Reactive.Concurrency Assembly: System.Reactive.dll Full name: System.Reactive.Concurrency.Scheduler Modifiers: public static

Summary

        Provides a set of static properties to access commonly used schedulers.
        

Applies to

netstandard2.0

Properties

NameSummary
static NowGets the current time according to the local machine's system clock.
static ImmediateGets a scheduler that schedules work immediately on the current thread.
static CurrentThreadGets a scheduler that schedules work as soon as possible on the current thread.
static DefaultGets a scheduler that schedules work on the platform's default scheduler.
static ThreadPoolGets a scheduler that schedules work on the thread pool.
static NewThreadGets a scheduler that schedules work on a new thread using default thread creation options.
static TaskPoolGets a scheduler that schedules work on Task Parallel Library (TPL) task pool using the default TaskScheduler.

Methods

NameSummary
static YieldYields execution of the current work item on the scheduler to another work item on the scheduler. The caller should await the result of calling Yield to schedule the remainder of the...
static SleepSuspends execution of the current work item on the scheduler for the specified duration. The caller should await the result of calling Sleep to schedule the remainder of the current work...
static ScheduleAsyncSchedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
static NormalizeNormalizes the specified TimeSpan value to a positive value.
static ScheduleSchedules an action to be executed recursively.
static AsLongRunningReturns the [ISchedulerLongRunning](# implementation of the specified scheduler, or null if no such implementation is available.
static AsStopwatchProviderReturns the [IStopwatchProvider](# implementation of the specified scheduler, or null if no such implementation is available.
static AsPeriodicReturns the [ISchedulerPeriodic](# implementation of the specified scheduler, or null if no such implementation is available.
static SchedulePeriodicSchedules a periodic piece of work by dynamically discovering the scheduler's capabilities. If the scheduler supports periodic scheduling, the request will be forwarded to the periodic...
static StartStopwatchStarts a new stopwatch object by dynamically discovering the scheduler's capabilities. If the scheduler provides stopwatch functionality, the request will be forwarded to the stopwatch...
static ScheduleLongRunningSchedules an action to be executed.
static DisableOptimizationsReturns a scheduler that represents the original scheduler, without any of its interface-based optimizations (e.g. long running scheduling).
static CatchReturns a scheduler that wraps the original scheduler, adding exception handling for scheduled actions.
Inherited members