ThreadPool.GetMinThreads Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Retrieves the number of idle threads the thread pool maintains in anticipation of new requests.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Shared Sub GetMinThreads ( _ <OutAttribute> ByRef workerThreads As Integer, _ <OutAttribute> ByRef completionPortThreads As Integer _ )
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.
Note: |
|---|
In Windows Phone apps, 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.
Note: