Export (0) Print
Expand All

ThreadPool.GetMaxThreads Method

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)

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

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 Silverlight-based applications, 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.

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