C# Class Amib.Threading.SmartThreadPool

Smart thread pool class.
Inheritance: IWorkItemsGroup, IDisposable
显示文件 Open project: amibar/SmartThreadPool Class Usage Examples

Public Properties

Property Type Description
DefaultMaxQueueLength int?
DefaultMaxStackSize int?
DefaultPerformanceCounterInstanceName string
DefaultPostExecuteWorkItemCallback PostExecuteWorkItemCallback

Private Properties

Property Type Description

Public Methods

Method Description
SmartThreadPool ( ) : System

Constructor

SmartThreadPool ( STPStartInfo stpStartInfo ) : System

Constructor

SmartThreadPool ( bool startSuspended ) : System

Constructor

SmartThreadPool ( int idleTimeout ) : System

Constructor

SmartThreadPool ( int idleTimeout, int maxWorkerThreads ) : System

Constructor

SmartThreadPool ( int idleTimeout, int maxWorkerThreads, int minWorkerThreads ) : System

Constructor

Method Details

SmartThreadPool() public method

Constructor
public SmartThreadPool ( ) : System
return System

SmartThreadPool() public method

Constructor
public SmartThreadPool ( STPStartInfo stpStartInfo ) : System
stpStartInfo STPStartInfo A SmartThreadPool configuration that overrides the default behavior
return System

SmartThreadPool() public method

Constructor
public SmartThreadPool ( bool startSuspended ) : System
startSuspended bool Set it to True to start thread pool in suspended mode; Explicit call to Start() will be needed to start the Thread pool.
return System

SmartThreadPool() public method

Constructor
public SmartThreadPool ( int idleTimeout ) : System
idleTimeout int Idle timeout in milliseconds
return System

SmartThreadPool() public method

Constructor
public SmartThreadPool ( int idleTimeout, int maxWorkerThreads ) : System
idleTimeout int Idle timeout in milliseconds
maxWorkerThreads int Upper limit of threads in the pool
return System

SmartThreadPool() public method

Constructor
public SmartThreadPool ( int idleTimeout, int maxWorkerThreads, int minWorkerThreads ) : System
idleTimeout int Idle timeout in milliseconds
maxWorkerThreads int Upper limit of threads in the pool
minWorkerThreads int Lower limit of threads in the pool
return System

Property Details

DefaultMaxQueueLength public_oe static_oe property

The default Max Queue Length (null).
public static int? DefaultMaxQueueLength
return int?

DefaultMaxStackSize public_oe static_oe property

The default Max Stack Size. (null)
public static int? DefaultMaxStackSize
return int?

DefaultPerformanceCounterInstanceName public_oe static_oe property

The default name to use for the performance counters instance. (null)
public static string DefaultPerformanceCounterInstanceName
return string

DefaultPostExecuteWorkItemCallback public_oe static_oe property

The default post execute method to run. (None) When null it means not to call it.
public static PostExecuteWorkItemCallback DefaultPostExecuteWorkItemCallback
return PostExecuteWorkItemCallback