Export (0) Print
Expand All

ThreadPool.GetMinThreads Method

Retrieves the number of idle threads the thread pool maintains in anticipation of new requests.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

[SecuritySafeCriticalAttribute]
public static void GetMinThreads(
	out int workerThreads,
	out int completionPortThreads
)

Parameters

workerThreads
Type: System.Int32%
The minimum number of idle worker threads currently maintained by the thread pool.
completionPortThreads
Type: System.Int32%
The minimum number of idle asynchronous I/O threads currently maintained by the thread pool.

Idle threads are maintained by the thread pool in order to reduce the time required to satisfy requests for thread pool threads. Separate minimums are maintained for worker threads and asynchronous I/O threads. Idle threads in excess of the minimums are terminated, to save system resources. Maintenance of the idle threads is a background task.

NoteNote:

In Silverlight-based applications, you cannot change the maximum and minimum number of worker threads.

When GetMinThreads returns, the variable specified by workerThreads contains the minimum number of idle worker threads the thread pool maintains, and the variable specified by completionPortThreads contains the minimum number of idle asynchronous I/O threads the thread pool maintains.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft