ITaskQueue

Description

interface Tinman.Core.Threading.Pooling.ITaskQueue
<TInput>
<TOutput>

A queue of task invocations.

Public / Methods

Flush


public method Flush → ()

Blocks the calling thread until all queued tasks have finished.

PoolingException

If a call to TaskResultVoid.Finish resp. TaskResult.Finish on a pending task has thrown a PoolingException

Pop


public method Pop → ()

returns → TOutput

The output data object.

Pops the next output from the task queue, waiting for task to finish if necessary.

PoolingException

If the task has thrown an exception.

Push


public method Push → (1)

input in : TInput

The input data object.

Pushes the given input data to the task queue.

Public / Attributes

IsEmpty


public attribute IsEmpty → (get)

value : bool

true if the task queue is empty, false if not.

Checks if the task queue is currently empty.

Calling Pop on an empty queue will block until a task produces a result.

IsFull


public attribute IsFull → (get)

value : bool

true if the task queue is full, false if not.

Checks if the task queue is currently full.

Calling Push on a full queue will block until a task result is fetched.

IsReady


public attribute IsReady → (get)

value : bool

true if at least one output data object can be fetched via Pop without blocking, false if not.

Checks if there is an output data object ready to be popped from the queue.

Task


public attribute Task → (get)

value : ITask<TInput, TOutput>

[not-null]
The task object.

The wrapped task object.