.NET Based OPC UA Client/Server SDK  3.3.0.530
UnifiedAutomation.UaBase.JobQueue< T > Class Template Reference

Executes jobs sequentially on the provide thread pool. More...

Public Member Functions

 JobQueue (ApplicationThreadPool threadPool)
 Creates a new instance. More...
 
StatusCode TryEnqueue (T data, Action< T > callback)
 Tries to enqueue a job to the queue. More...
 
void Clear ()
 Removes all outstanding jobs from the queue. More...
 

Properties

int MaxCount [get, set]
 The max count of jobs to be queued. More...
 

Detailed Description

Executes jobs sequentially on the provide thread pool.

Template Parameters
TThe type of the job data.

Constructor & Destructor Documentation

UnifiedAutomation.UaBase.JobQueue< T >.JobQueue ( ApplicationThreadPool  threadPool)

Creates a new instance.

Parameters
threadPoolThe thread pool.

Member Function Documentation

void UnifiedAutomation.UaBase.JobQueue< T >.Clear ( )

Removes all outstanding jobs from the queue.

StatusCode UnifiedAutomation.UaBase.JobQueue< T >.TryEnqueue ( data,
Action< T >  callback 
)

Tries to enqueue a job to the queue.

If the job cannot be queued to the thread pool, the return value will be not good and the callback will not be called by the queue.

Parameters
dataThe data passed to the callback.
callbackThe callback to be executed.
Returns
Returns StatusCodes.Good on success.

Property Documentation

int UnifiedAutomation.UaBase.JobQueue< T >.MaxCount
getset

The max count of jobs to be queued.

Default value is Int32.MaxValue.


The documentation for this class was generated from the following file: