ITaskQueue

Description

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

A queue of task invocations.

See also

ITask.Queue

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 a pending task to finish, if necessary.

This method should only be called when IsEmpty returns false.

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.

This method should only be called when IsFull returns false.

Public / Attributes

Is​Empty


public attribute IsEmpty → (get)

value : bool

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

Checks if the task queue is currently empty, i.e. there is no output data object ready and there are no pending task invocations.

Calling Pop on an empty queue will never block and will always return the default output value.

Is​Full


public attribute IsFull → (get)

value : bool

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

Checks if the task queue is currently full, i.e. the maximum number of pending task invocations has been reached.

Calling Push on a full queue will exceed the maximum number of pending task invocations, but will otherwise not have any adverse effects.

Is​Ready


public attribute IsReady → (get)

value : bool

true if at least one output data object is ready and 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 without blocking.

Task


public attribute Task → (get)

value : ITask<TInput, TOutput>

[not-null]
The task object.

The wrapped task object.