Export (0) Print
Expand All

ThreadPool Methods

The ThreadPool type exposes the following members.

  NameDescription
Public method Static member BindHandle(IntPtr) Obsolete. Binds an operating system handle to the ThreadPool.
Public method Static member BindHandle(SafeHandle) Binds an operating system handle to the ThreadPool.
Public method Static member GetAvailableThreads Retrieves the difference between the maximum number of thread pool threads returned by the GetMaxThreads method, and the number currently active.
Public method Static member GetMaxThreads Retrieves the number of requests to the thread pool that can be active concurrently. All requests above that number remain queued until thread pool threads become available.
Public method Static member GetMinThreads Retrieves the minimum number of threads the thread pool creates on demand, as new requests are made, before switching to an algorithm for managing thread creation and destruction.
Public method Static member QueueUserWorkItem(WaitCallback) Queues a method for execution. The method executes when a thread pool thread becomes available.
Public method Static member QueueUserWorkItem(WaitCallback, Object) Queues a method for execution, and specifies an object containing data to be used by the method. The method executes when a thread pool thread becomes available.
Public method Static member RegisterWaitForSingleObject(WaitHandle, WaitOrTimerCallback, Object, Int32, Boolean) Registers a delegate to wait for a WaitHandle, specifying a 32-bit signed integer for the time-out in milliseconds.
Public method Static member RegisterWaitForSingleObject(WaitHandle, WaitOrTimerCallback, Object, Int64, Boolean) Registers a delegate to wait for a WaitHandle, specifying a 64-bit signed integer for the time-out in milliseconds.
Public method Static member RegisterWaitForSingleObject(WaitHandle, WaitOrTimerCallback, Object, TimeSpan, Boolean) Registers a delegate to wait for a WaitHandle, specifying a TimeSpan value for the time-out.
Public method Static member RegisterWaitForSingleObject(WaitHandle, WaitOrTimerCallback, Object, UInt32, Boolean) Registers a delegate to wait for a WaitHandle, specifying a 32-bit unsigned integer for the time-out in milliseconds.
Public method Static member SetMaxThreads Sets the number of requests to the thread pool that can be active concurrently. All requests above that number remain queued until thread pool threads become available.
Public method Static member SetMinThreads Sets the minimum number of threads the thread pool creates on demand, as new requests are made, before switching to an algorithm for managing thread creation and destruction.
Public method Static member UnsafeQueueNativeOverlapped Queues an overlapped I/O operation for execution.
Public method Static member UnsafeQueueUserWorkItem Queues the specified delegate to the thread pool, but does not propagate the calling stack to the worker thread.
Public method Static member UnsafeRegisterWaitForSingleObject(WaitHandle, WaitOrTimerCallback, Object, Int32, Boolean) Registers a delegate to wait for a WaitHandle, using a 32-bit signed integer for the time-out in milliseconds. This method does not propagate the calling stack to the worker thread.
Public method Static member UnsafeRegisterWaitForSingleObject(WaitHandle, WaitOrTimerCallback, Object, Int64, Boolean) Registers a delegate to wait for a WaitHandle, specifying a 64-bit signed integer for the time-out in milliseconds. This method does not propagate the calling stack to the worker thread.
Public method Static member UnsafeRegisterWaitForSingleObject(WaitHandle, WaitOrTimerCallback, Object, TimeSpan, Boolean) Registers a delegate to wait for a WaitHandle, specifying a TimeSpan value for the time-out. This method does not propagate the calling stack to the worker thread.
Public method Static member UnsafeRegisterWaitForSingleObject(WaitHandle, WaitOrTimerCallback, Object, UInt32, Boolean) Registers a delegate to wait for a WaitHandle, specifying a 32-bit unsigned integer for the time-out in milliseconds. This method does not propagate the calling stack to the worker thread.
Top

Community Additions

ADD
Show:
© 2014 Microsoft