Scheduler Class

Provides a set of static methods for creating Schedulers.

Inheritance Hierarchy

System.Object
  System.Reactive.Concurrency.Scheduler

Namespace:  System.Reactive.Concurrency
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public NotInheritable Class Scheduler
'Usage
public static class Scheduler
[ExtensionAttribute]
public ref class Scheduler abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type Scheduler =  class end
public final class Scheduler

The Scheduler type exposes the following members.

Properties

  Name Description
Public propertyStatic member CurrentThread Gets the scheduler that schedules work as soon as possible on the current thread.
Public propertyStatic member Immediate Gets the scheduler that schedules work immediately on the current thread.
Public propertyStatic member NewThread Gets the scheduler that schedules work on a new thread.
Public propertyStatic member Now Represents a notion of time for this scheduler. Tasks being scheduled on a scheduler will adhere to the time denoted by this property.
Public propertyStatic member TaskPool Gets the scheduler that schedules work on the default Task Factory.
Public propertyStatic member ThreadPool Gets the scheduler that schedules work on the ThreadPool.

Top

Methods

  Name Description
Public methodStatic member Normalize Ensures that no time spans are negative.
Public methodStatic member Schedule(IScheduler, Action) Schedules an action to be executed.
Public methodStatic member Schedule(IScheduler, Action<Action>) Schedules an action to be executed recursively.
Public methodStatic member Schedule(IScheduler, DateTimeOffset, Action) Schedules an action to be executed at dueTime.
Public methodStatic member Schedule(IScheduler, DateTimeOffset, Action<Action<DateTimeOffset>>) Schedules an action to be executed after dueTime.
Public methodStatic member Schedule(IScheduler, TimeSpan, Action) Schedules an action to be executed after dueTime.
Public methodStatic member Schedule(IScheduler, TimeSpan, Action<Action<TimeSpan>>) Schedules an action to be executed recursively after each dueTime.
Public methodStatic member Schedule<TState>(IScheduler, TState, Action<TState, Action<TState>>) Schedules an action to be executed recursively.
Public methodStatic member Schedule<TState>(IScheduler, TState, DateTimeOffset, Action<TState, Action<TState, DateTimeOffset>>) Schedules an action to be executed recursively at each dueTime.
Public methodStatic member Schedule<TState>(IScheduler, TState, TimeSpan, Action<TState, Action<TState, TimeSpan>>) Schedules an action to be executed recursively after each dueTime.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Reactive.Concurrency Namespace