Class TestWorker
A TestWorker pulls work items from a queue and executes them.
public class TestWorker
- Inheritance
-
TestWorker
- Inherited Members
Constructors
TestWorker(WorkItemQueue, string)
Construct a new TestWorker.
public TestWorker(WorkItemQueue queue, string name)
Parameters
queue
WorkItemQueueThe queue from which to pull work items
name
stringThe name of this worker
Properties
IsAlive
Indicates whether the worker thread is running
public bool IsAlive { get; }
Property Value
Name
The name of this worker - also used for the thread
public string Name { get; }
Property Value
WorkQueue
The WorkItemQueue from which this worker pulls WorkItems
public WorkItemQueue WorkQueue { get; }
Property Value
Methods
Cancel(bool)
Stop the thread, either immediately or after finishing the current WorkItem
public void Cancel(bool force)
Parameters
force
booltrue if the thread should be aborted, false if it should allow the currently running test to complete
Start()
Create thread and start processing work items.
public void Start()
Events
Busy
Event signaled immediately before executing a WorkItem
public event TestWorker.TestWorkerEventHandler? Busy
Event Type
Idle
Event signaled immediately after executing a WorkItem
public event TestWorker.TestWorkerEventHandler? Idle