OpenTAP 9.25
API Reference
|
Work Queue used for result processing in sequence but asynchronously. It uses the ThreadManager to automatically clean up threads that have been idle for a while. When the WorkQueue is disposed, the used thread is immediately returned to the ThreadManager. More...
Inherits IDisposable.
Public Types | |
enum | Options { None = 0 , LongRunning = 1 , TimeAveraging = 2 } |
Options for WorkQueues. More... | |
Public Member Functions | |
WorkQueue (Options options, string name="") | |
Creates a new instance of WorkQueue. More... | |
WorkQueue (Options options, string name="", TapThread threadContext=null) | |
Creates a new instance of WorkQueue. More... | |
void | EnqueueWork (Action a) |
Enqueue a new piece of work to be handled in the future. | |
void | Dispose () |
Give the thread back to the thread manager. | |
void | Wait () |
Waits for the workqueue to become empty. | |
Work Queue used for result processing in sequence but asynchronously. It uses the ThreadManager to automatically clean up threads that have been idle for a while. When the WorkQueue is disposed, the used thread is immediately returned to the ThreadManager.
Options for WorkQueues.
Enumerator | |
---|---|
None | No options. |
LongRunning | The thread is not returned to the ThreadManager when it has been idle for some time. In this situation the WorkQueue must be disposed manually. |
TimeAveraging | Time averaging is enabled. Each piece of work will have measured time spent. |
|
inline |
Creates a new instance of WorkQueue.
options | Options. |
name | A name to identify a work queue. |
|
inline |
Creates a new instance of WorkQueue.
options | Options. |
name | A name to identify a work queue. |
threadContext | The thread context in which to run work jobs. The default value causes the context to be the parent of an enqueuing thread. |
OpenTAP 9.25 API built Tue Aug 6 2024 07:49:25