Interface IScheduler
Interface representing a logical scheduler. Tasks scheduled through the same logical scheduler are managed as a group.
Namespace: Reaqtive.Scheduler
Assembly: Reaqtive.Interfaces.dll
Syntax
public interface IScheduler : IDisposable
Properties
Now
Gets the current time.
Declaration
DateTimeOffset Now { get; }
Property Value
Type | Description |
---|---|
System.DateTimeOffset |
Methods
CheckAccess()
Determines whether the calling thread has access to the scheduler.
Declaration
bool CheckAccess()
Returns
Type | Description |
---|---|
System.Boolean |
|
Continue()
Continues all tasks on the scheduler and any of the child schedulers.
Declaration
void Continue()
CreateChildScheduler()
Creates a child scheduler.
Declaration
IScheduler CreateChildScheduler()
Returns
Type | Description |
---|---|
IScheduler | A child scheduler. |
PauseAsync()
Asynchronously pauses all tasks on the scheduler and any of the child schedulers.
Declaration
Task PauseAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the eventual completion of pausing all tasks on the scheduler. |
RecalculatePriority()
Recalculates the priority of all tasks in the scheduler. As the result of recalculation some tasks can become runnable/change priority.
Declaration
void RecalculatePriority()
Schedule(ISchedulerTask)
Schedules the specified task.
Declaration
void Schedule(ISchedulerTask task)
Parameters
Type | Name | Description |
---|---|---|
ISchedulerTask | task | The task to schedule. |
Schedule(DateTimeOffset, ISchedulerTask)
Schedules the specified task at the specified absolute due time.
Declaration
void Schedule(DateTimeOffset dueTime, ISchedulerTask task)
Parameters
Type | Name | Description |
---|---|---|
System.DateTimeOffset | dueTime | The due time. |
ISchedulerTask | task | The task to schedule. |
Schedule(TimeSpan, ISchedulerTask)
Schedules the specified task at the specified relative due time.
Declaration
void Schedule(TimeSpan dueTime, ISchedulerTask task)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | dueTime | The due time. |
ISchedulerTask | task | The task to schedule. |
VerifyAccess()
Determines whether the calling thread has access to the scheduler.
Declaration
void VerifyAccess()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The calling thread does not have access to this scheduler. |
Events
UnhandledException
Event to observe unhandled exceptions and optionally mark them as handled.
Declaration
event EventHandler<SchedulerUnhandledExceptionEventArgs> UnhandledException
Event Type
Type | Description |
---|---|
System.EventHandler<SchedulerUnhandledExceptionEventArgs> |