GetMaxThreads Method
Collapse the table of content
Expand the table of content

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.

Namespace:  System.Threading
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.

NoteNote:

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft