C# Class System.Threading.ThreadPool

显示文件 Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
GetAvailableThreads ( int &workerThreads, int &completionPortThreads ) : void
GetMaxThreads ( int &workerThreads, int &completionPortThreads ) : void
GetMinThreads ( int &workerThreads, int &completionPortThreads ) : void
QueueUserWorkItem ( System callBack ) : bool
QueueUserWorkItem ( System callBack, object state ) : bool
RegisterWaitForSingleObject ( System waitObject, System callBack, object state, System timeout, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
RegisterWaitForSingleObject ( System waitObject, System callBack, object state, int millisecondsTimeOutInterval, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
RegisterWaitForSingleObject ( System waitObject, System callBack, object state, long millisecondsTimeOutInterval, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
SetMaxThreads ( int workerThreads, int completionPortThreads ) : bool
SetMinThreads ( int workerThreads, int completionPortThreads ) : bool
UnsafeQueueUserWorkItem ( System callBack, object state ) : bool
UnsafeRegisterWaitForSingleObject ( System waitObject, System callBack, object state, System timeout, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
UnsafeRegisterWaitForSingleObject ( System waitObject, System callBack, object state, int millisecondsTimeOutInterval, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
UnsafeRegisterWaitForSingleObject ( System waitObject, System callBack, object state, long millisecondsTimeOutInterval, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle

Private Methods

Method Description
BindHandle ( System osHandle ) : bool
RegisterWaitForSingleObject ( System waitObject, System callBack, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
UnsafeQueueNativeOverlapped ( System overlapped ) : bool
UnsafeRegisterWaitForSingleObject ( System waitObject, System callBack, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle

Method Details

GetAvailableThreads() public static method

public static GetAvailableThreads ( int &workerThreads, int &completionPortThreads ) : void
workerThreads int
completionPortThreads int
return void

GetMaxThreads() public static method

public static GetMaxThreads ( int &workerThreads, int &completionPortThreads ) : void
workerThreads int
completionPortThreads int
return void

GetMinThreads() public static method

public static GetMinThreads ( int &workerThreads, int &completionPortThreads ) : void
workerThreads int
completionPortThreads int
return void

QueueUserWorkItem() public static method

public static QueueUserWorkItem ( System callBack ) : bool
callBack System
return bool

QueueUserWorkItem() public static method

public static QueueUserWorkItem ( System callBack, object state ) : bool
callBack System
state object
return bool

RegisterWaitForSingleObject() public static method

public static RegisterWaitForSingleObject ( System waitObject, System callBack, object state, System timeout, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
waitObject System
callBack System
state object
timeout System
executeOnlyOnce bool
return System.Threading.RegisteredWaitHandle

RegisterWaitForSingleObject() public static method

public static RegisterWaitForSingleObject ( System waitObject, System callBack, object state, int millisecondsTimeOutInterval, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
waitObject System
callBack System
state object
millisecondsTimeOutInterval int
executeOnlyOnce bool
return System.Threading.RegisteredWaitHandle

RegisterWaitForSingleObject() public static method

public static RegisterWaitForSingleObject ( System waitObject, System callBack, object state, long millisecondsTimeOutInterval, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
waitObject System
callBack System
state object
millisecondsTimeOutInterval long
executeOnlyOnce bool
return System.Threading.RegisteredWaitHandle

SetMaxThreads() public static method

public static SetMaxThreads ( int workerThreads, int completionPortThreads ) : bool
workerThreads int
completionPortThreads int
return bool

SetMinThreads() public static method

public static SetMinThreads ( int workerThreads, int completionPortThreads ) : bool
workerThreads int
completionPortThreads int
return bool

UnsafeQueueUserWorkItem() public static method

public static UnsafeQueueUserWorkItem ( System callBack, object state ) : bool
callBack System
state object
return bool

UnsafeRegisterWaitForSingleObject() public static method

public static UnsafeRegisterWaitForSingleObject ( System waitObject, System callBack, object state, System timeout, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
waitObject System
callBack System
state object
timeout System
executeOnlyOnce bool
return System.Threading.RegisteredWaitHandle

UnsafeRegisterWaitForSingleObject() public static method

public static UnsafeRegisterWaitForSingleObject ( System waitObject, System callBack, object state, int millisecondsTimeOutInterval, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
waitObject System
callBack System
state object
millisecondsTimeOutInterval int
executeOnlyOnce bool
return System.Threading.RegisteredWaitHandle

UnsafeRegisterWaitForSingleObject() public static method

public static UnsafeRegisterWaitForSingleObject ( System waitObject, System callBack, object state, long millisecondsTimeOutInterval, bool executeOnlyOnce ) : System.Threading.RegisteredWaitHandle
waitObject System
callBack System
state object
millisecondsTimeOutInterval long
executeOnlyOnce bool
return System.Threading.RegisteredWaitHandle