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¶
| Name | Summary |
|---|---|
| static Now | Gets the current time according to the local machine's system clock. |
| static Immediate | Gets a scheduler that schedules work immediately on the current thread. |
| static CurrentThread | Gets a scheduler that schedules work as soon as possible on the current thread. |
| static Default | Gets a scheduler that schedules work on the platform's default scheduler. |
| static ThreadPool | Gets a scheduler that schedules work on the thread pool. |
| static NewThread | Gets a scheduler that schedules work on a new thread using default thread creation options. |
| static TaskPool | Gets a scheduler that schedules work on Task Parallel Library (TPL) task pool using the default TaskScheduler. |
Methods¶
| Name | Summary |
|---|---|
| static Yield | Yields 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 Sleep | Suspends 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 ScheduleAsync | Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style. |
| static Normalize | Normalizes the specified TimeSpan value to a positive value. |
| static Schedule | Schedules an action to be executed recursively. |
| static AsLongRunning | Returns the [ISchedulerLongRunning](# implementation of the specified scheduler, or null if no such implementation is available. |
| static AsStopwatchProvider | Returns the [IStopwatchProvider](# implementation of the specified scheduler, or null if no such implementation is available. |
| static AsPeriodic | Returns the [ISchedulerPeriodic](# implementation of the specified scheduler, or null if no such implementation is available. |
| static SchedulePeriodic | Schedules 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 StartStopwatch | Starts 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 ScheduleLongRunning | Schedules an action to be executed. |
| static DisableOptimizations | Returns a scheduler that represents the original scheduler, without any of its interface-based optimizations (e.g. long running scheduling). |
| static Catch | Returns a scheduler that wraps the original scheduler, adding exception handling for scheduled actions. |