Table of Contents

Class HystrixQueuedTaskScheduler

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 HystrixQueuedTaskScheduler : HystrixTaskScheduler, IHystrixTaskScheduler, IDisposable
Inheritance
HystrixQueuedTaskScheduler
Implements
Inherited Members

Constructors

HystrixQueuedTaskScheduler(IHystrixThreadPoolOptions)

public HystrixQueuedTaskScheduler(IHystrixThreadPoolOptions options)

Parameters

options IHystrixThreadPoolOptions

Fields

workQueue

protected BlockingCollection<Task> workQueue

Field Value

BlockingCollection<Task>

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.

StartThreadPoolWorker()

protected void StartThreadPoolWorker()

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.