fm.liveswitch.DispatchQueue< T > Class Template Reference

A dispatch queue. More...

Public Member Functions

void destroy ()
 Destroys the queue. More...
 
 DispatchQueue (fm.liveswitch.IAction1< T > action)
 Initializes a new instance of the fm.liveswitch.DispatchQueue class. More...
 
 DispatchQueue (fm.liveswitch.IFunction1< T, fm.liveswitch.Future< Object >> func)
 Initializes a new instance of the fm.liveswitch.DispatchQueue class. More...
 
void enqueue (T item)
 Enqueues an item for processing. More...
 
long getQueueCount ()
 Gets the number of items in the queue. More...
 
void waitForDrain ()
 Blocks until the queue is empty. More...
 

Detailed Description

A dispatch queue.

Constructor & Destructor Documentation

◆ DispatchQueue() [1/2]

Initializes a new instance of the fm.liveswitch.DispatchQueue class.

Parameters
actionThe processing action.

◆ DispatchQueue() [2/2]

Initializes a new instance of the fm.liveswitch.DispatchQueue class.

Parameters
funcThe processing function.

Member Function Documentation

◆ destroy()

void fm.liveswitch.DispatchQueue< T >.destroy ( )

Destroys the queue.

Implements fm.liveswitch.IDispatchQueue< T >.

◆ enqueue()

void fm.liveswitch.DispatchQueue< T >.enqueue ( item)

Enqueues an item for processing.

Parameters
itemThe item.

Implements fm.liveswitch.IDispatchQueue< T >.

◆ getQueueCount()

long fm.liveswitch.DispatchQueue< T >.getQueueCount ( )

Gets the number of items in the queue.

Implements fm.liveswitch.IDispatchQueue< T >.

◆ waitForDrain()

void fm.liveswitch.DispatchQueue< T >.waitForDrain ( )

Blocks until the queue is empty.