ImmediateScheduler
StockSharp.Xaml.Charting.Threading
Provides a task scheduler that runs tasks on the current thread.
Inherits: TaskScheduler
Properties
MaximumConcurrencyLevel
public override int MaximumConcurrencyLevel { get; }
value = immediateScheduler.MaximumConcurrencyLevel
Gets the maximum degree of parallelism for this scheduler.
Methods
GetScheduledTasks
protected override IEnumerable<Task> GetScheduledTasks()
result = immediateScheduler.GetScheduledTasks()
Gets the Tasks currently scheduled to this scheduler.
Returns: An empty enumerable, as Tasks are never queued, only executed.
QueueTask
protected override void QueueTask(Task task)
immediateScheduler.QueueTask(task)
Runs the provided Task synchronously on the current thread.
- task
- The task to be executed.
TryExecuteTaskInline
protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)
result = immediateScheduler.TryExecuteTaskInline(task, taskWasPreviouslyQueued)
Runs the provided Task synchronously on the current thread.
- task
- The task to be executed.
- taskWasPreviouslyQueued
- Whether the Task was previously queued to the scheduler.
Returns: True if the Task was successfully executed; otherwise, false.