Class CurrentThreadScheduler
Represents an object that schedules units of work on the current thread.
Inherited Members
Namespace: System.Reactive.Concurrency
Assembly: System.Reactive.Core.dll
Syntax
public sealed class CurrentThreadScheduler : LocalScheduler, IScheduler, IStopwatchProvider, IServiceProvider
Properties
| Improve this Doc View SourceInstance
Gets the singleton instance of the current thread scheduler.
Declaration
public static CurrentThreadScheduler Instance { get; }
Property Value
| Type | Description |
|---|---|
| CurrentThreadScheduler |
IsScheduleRequired
Gets a value that indicates whether the caller must call a Schedule method.
Declaration
public static bool IsScheduleRequired { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
ScheduleRequired
Gets a value that indicates whether the caller must call a Schedule method.
Declaration
[Obsolete("This instance property is no longer supported. Use CurrentThreadScheduler.IsScheduleRequired instead. See http://go.microsoft.com/fwlink/?LinkID=260866 for more information.")]
public bool ScheduleRequired { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Methods
| Improve this Doc View SourceSchedule<TState>(TState, TimeSpan, Func<IScheduler, TState, IDisposable>)
Schedules an action to be executed after dueTime.
Declaration
public override IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action)
Parameters
| Type | Name | Description |
|---|---|---|
| TState | state | State passed to the action to be executed. |
| TimeSpan | dueTime | Relative time after which to execute the action. |
| Func<IScheduler, TState, IDisposable> | action | Action to be executed. |
Returns
| Type | Description |
|---|---|
| IDisposable | The disposable object used to cancel the scheduled action (best effort). |
Type Parameters
| Name | Description |
|---|---|
| TState | The type of the state passed to the scheduled action. |
Overrides
System.Reactive.Concurrency.LocalScheduler.Schedule<TState>(TState, System.TimeSpan, System.Func<System.Reactive.Concurrency.IScheduler, TState, System.IDisposable>)
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|