Class ThreadPoolExecutor
This class provides a wrapper around the ThreadPool mechanism in .NET to allow for serial execution of jobs in the ThreadPool and provide a means of shutting down the execution of jobs in a deterministic way.
Inheritance
System.Object
ThreadPoolExecutor
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Apache.NMS.ActiveMQ.Threads
Assembly: Apache.NMS.ActiveMQ.dll
Syntax
public class ThreadPoolExecutor
Properties
| Improve this Doc View SourceIsShutdown
Returns true if this ThreadPoolExecutor has been shut down but has not finished running all the tasks that have been Queue. When a ThreadPoolExecutor is shut down it will not accept any new tasks but it will complete all tasks that have been previously queued.
Declaration
public bool IsShutdown { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsTerminated
Returns true if this ThreadPoolExecutor has been shut down and has also completed processing of all outstanding tasks in its task Queue.
Declaration
public bool IsTerminated { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceAwaitTermination(TimeSpan)
Declaration
public bool AwaitTermination(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | timeout |
Returns
Type | Description |
---|---|
System.Boolean |
QueueUserWorkItem(WaitCallback)
Declaration
public void QueueUserWorkItem(WaitCallback worker)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.WaitCallback | worker |
QueueUserWorkItem(WaitCallback, Object)
Declaration
public void QueueUserWorkItem(WaitCallback worker, object arg)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.WaitCallback | worker | |
System.Object | arg |
Shutdown()
Declaration
public void Shutdown()