Table of Contents

Class HystrixSyncTaskScheduler

Namespace
Steeltoe.CircuitBreaker.Hystrix.Strategy.Concurrency
Assembly
Steeltoe.CircuitBreaker.HystrixBase.dll
[Obsolete("This feature will be removed in the next major version. See https://steeltoe.io/docs/v3/obsolete for details.")]
public class HystrixSyncTaskScheduler : HystrixTaskScheduler, IHystrixTaskScheduler, IDisposable
Inheritance
HystrixSyncTaskScheduler
Implements
Inherited Members

Constructors

HystrixSyncTaskScheduler(IHystrixThreadPoolOptions)

public HystrixSyncTaskScheduler(IHystrixThreadPoolOptions options)

Parameters

options IHystrixThreadPoolOptions

Properties

CurrentQueueSize

public override int CurrentQueueSize { get; }

Property Value

int

IsQueueSpaceAvailable

public override bool IsQueueSpaceAvailable { get; }

Property Value

bool

Methods

GetScheduledTasks()

For debugger support only, generates an enumerable of Task instances currently queued to the scheduler waiting to be executed.

protected override IEnumerable<Task> GetScheduledTasks()

Returns

IEnumerable<Task>

An enumerable that allows a debugger to traverse the tasks currently queued to this scheduler.

Exceptions

NotSupportedException

This scheduler is unable to generate a list of queued tasks at this time.

QueueTask(Task)

Queues a Task to the scheduler.

protected override void QueueTask(Task task)

Parameters

task Task

The Task to be queued.

Exceptions

ArgumentNullException

The task argument is null.

SetupWorkQueues(int)

protected void SetupWorkQueues(int size)

Parameters

size int

StartThreadPoolWorker()

protected virtual void StartThreadPoolWorker()

StartThreadPoolWorker(ThreadTaskQueue)

protected virtual void StartThreadPoolWorker(HystrixSyncTaskScheduler.ThreadTaskQueue input)

Parameters

input HystrixSyncTaskScheduler.ThreadTaskQueue

TryAddToAny(Task)

protected virtual bool TryAddToAny(Task task)

Parameters

task Task

Returns

bool

TryExecuteTaskInline(Task, bool)

Determines whether the provided Task can be executed synchronously in this call, and if it can, executes it.

protected override bool TryExecuteTaskInline(Task task, bool prevQueued)

Parameters

task Task

The Task to be executed.

prevQueued bool

Returns

bool

A Boolean value indicating whether the task was executed inline.

Exceptions

ArgumentNullException

The task argument is null.

InvalidOperationException

The task was already executed.