TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface ITaskQueue in Tinman.Core.Threading.Pooling

A queue of task invocations.

interface ITaskQueue with <TInput>  
  <TOutput>  
  extends IFlushable

Attributes

IsEmpty

Checks if the task queue is currently empty.

property IsEmpty { get }
type bool
value true if the task queue is empty, false if not.

Remarks:

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

IsFull

Checks if the task queue is currently full.

property IsFull { get }
type bool
value true if the task queue is full, false if not.

Remarks:

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

Task

The wrapped task object.

property Task { get }
type ITask<TInput, TOutput>
value [not-null] The task object.

Methods

Flush

Flushes all cached data.

method Flush ()
inherited IFlushable.Flush

Remarks:

Performing a flush may result in I/O work. Depending on the semantics of the implementing class, this work may need to be wrapped in special Begin / End method calls. See the documentation of the implementing classes for details.

In case this object represents a read-only resource, calling the Flush method has no effect.

Pop

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

method Pop ()
type TOutput
returns The output data object.

Exceptions:

Push

Pushes the given input data to the task queue.

method Push (TInput input)
params input The input data object.

Ready

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

method Ready ()
type bool
returns true if at least one output data object can be fetched via Pop without blocking, false if not.