Wiki Navigation
- Loading...
This interface is the public representation of the threadpool service. You can add regular or interval-based workload to be performed, obtain status information about the threadpool or control the threadpool through this public interface.
Methods for adding regular workload
- IWork Add(DoWorkHandler)
- IWork Add(DoWorkHandler, QueuePriority)
- IWork Add(DoWorkHandler, string)
- IWork Add(DoWorkHandler, ThreadPriority)
- IWork Add(DoWorkHandler, WorkEventHandler)
- IWork Add(DoWorkHandler, string, QueuePriority)
- IWork Add(DoWorkHandler, string, QueuePriority, ThreadPriority)
- IWork Add(DoWorkHandler, string, QueuePriority, ThreadPriority, WorkEventHandler)
- void Add(Work)
- void Add(Work, QueuePriority)
- void Add( IWork )
- void Add( IWork , QueuePriority)
Parameter description
- IWork - work to be performed by the threadpool represented with the IWork interface
- Work - work to be performed by the threadpool represented as a Work object
- DoWorkHandler - work to be performed by the threadpool represented as a DoWorkHandler delegate
- QueuePriority - Sets the queue priority of the work item
- string - Descriptive name of the workload
- ThreadPriority - Thread priority to be used for this particular workload
- WorkEventHandler - Event handler delegate which should be called when the workload is completed by the threadpool
Return value description
- IWork - reference to the workload object interface for obtaining workload status and execution information
Methods for adding interval-based workload
- void AddIntervalWork(IWorkInterval, bool)
- void RemoveIntervalWork( IWorkInterval )
Parameter description
- IWorkInterval - Interval-based workload to be performed by the threadpool represented with the IWorkInterval interface
- bool - Indicates whether or not the threadpool should execute the interval-based workload immediately after submission
Methods for controlling the threadpool
- void Stop() - Stops the threadpool
Properties for obtaining status information about the threadpool
- int ThreadCount { get; } - Total amount of threads in the threadpool (both active and inactive)
- int BusyThreadCount { get; } - Number of threads which are currently busy processing a work item
- long WorkItemsProcessed { get; } - Number of work items processed by the threadpool
- int QueueLength { get; } - Number of pending work items waiting in the queue to be serviced
- int MinimumThreads { get; } - Minimum number of total threads in the threadpool
- int MaximumThreads { get; } - Maximum number of total threads in the threadpool
This page has no comments.