ThreadPool.GetMaxThreads Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
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.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Shared Sub GetMaxThreads ( _ <OutAttribute> ByRef workerThreads As Integer, _ <OutAttribute> ByRef completionPortThreads As Integer _ )
Parameters
- workerThreads
- Type:
System.Int32
%
The maximum number of worker threads in the thread pool.
- completionPortThreads
- Type:
System.Int32
%
The maximum number of asynchronous I/O threads in the thread pool.
When GetMaxThreads returns, the variable specified by workerThreads contains the maximum number of worker threads allowed in the thread pool, and the variable specified by completionPortThreads contains the maximum number of asynchronous I/O threads allowed in the thread pool.
Note: |
|---|
In Windows Phone apps, you cannot change the maximum and minimum number of worker threads. |
You can queue as many thread pool requests as system memory allows. If there are more requests than thread pool threads, the additional requests remain queued until thread pool threads become available.
Note: