1 <?xml version="1.0" encoding="utf-8"?><span>
4 <name>System.Threading.ThreadPool</name>
7 <member name="T:System.Threading.RegisteredWaitHandle">
8 <summary>Represents a handle that has been registered when calling <see cref="M:System.Threading.ThreadPool.RegisterWaitForSingleObject(System.Threading.WaitHandle,System.Threading.WaitOrTimerCallback,System.Object,System.UInt32,System.Boolean)"></see>. This class cannot be inherited.</summary>
10 <member name="M:System.Threading.RegisteredWaitHandle.Unregister(System.Threading.WaitHandle)">
11 <summary>Cancels a registered wait operation issued by the <see cref="M:System.Threading.ThreadPool.RegisterWaitForSingleObject(System.Threading.WaitHandle,System.Threading.WaitOrTimerCallback,System.Object,System.UInt32,System.Boolean)"></see> method.</summary>
12 <param name="waitObject">The <see cref="T:System.Threading.WaitHandle"></see> to be signaled.</param>
13 <returns>true if the function succeeds; otherwise, false.</returns>
15 <member name="T:System.Threading.ThreadPool">
16 <summary>Provides a pool of threads that can be used to execute tasks, post work items, process asynchronous I/O, wait on behalf of other threads, and process timers.</summary>
18 <member name="M:System.Threading.ThreadPool.BindHandle(System.IntPtr)">
19 <summary>Binds an operating system handle to the <see cref="T:System.Threading.ThreadPool"></see>.</summary>
20 <param name="osHandle">An <see cref="T:System.IntPtr"></see> that holds the handle. The handle must have been opened for overlapped I/O on the unmanaged side.</param>
21 <returns>true if the handle is bound; otherwise, false.</returns>
22 <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
24 <member name="M:System.Threading.ThreadPool.BindHandle(System.Runtime.InteropServices.SafeHandle)">
25 <summary>Binds an operating system handle to the <see cref="T:System.Threading.ThreadPool"></see>.</summary>
26 <param name="osHandle">A <see cref="T:System.Runtime.InteropServices.SafeHandle"></see> that holds the operating system handle. The handle must have been opened for overlapped I/O on the unmanaged side.</param>
27 <returns>true if the handle is bound; otherwise, false.</returns>
28 <exception cref="T:System.ArgumentNullException"><paramref name="osHandle">osHandle</paramref> is null.</exception>
30 <member name="M:System.Threading.ThreadPool.GetAvailableThreads(System.Int32@,System.Int32@)">
31 <summary>Retrieves the difference between the maximum number of thread pool threads returned by the <see cref="M:System.Threading.ThreadPool.GetMaxThreads(System.Int32@,System.Int32@)"></see> method, and the number currently active.</summary>
32 <param name="workerThreads">The number of available worker threads.</param>
33 <param name="completionPortThreads">The number of available asynchronous I/O threads.</param>
35 <member name="M:System.Threading.ThreadPool.GetMaxThreads(System.Int32@,System.Int32@)">
36 <summary>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.</summary>
37 <param name="workerThreads">The maximum number of worker threads in the thread pool.</param>
38 <param name="completionPortThreads">The maximum number of asynchronous I/O threads in the thread pool.</param>
40 <member name="M:System.Threading.ThreadPool.GetMinThreads(System.Int32@,System.Int32@)">
41 <summary>Retrieves the minimum number of threads the thread pool creates on demand, as new requests are made, before switching to an algorithm for managing thread creation and destruction.</summary>
42 <param name="workerThreads">When this method returns, contains the minimum number of worker threads that the thread pool creates on demand.</param>
43 <param name="completionPortThreads">When this method returns, contains the minimum number of asynchronous I/O threads that the thread pool creates on demand.</param>
45 <member name="M:System.Threading.ThreadPool.QueueUserWorkItem(System.Threading.WaitCallback)">
46 <summary>Queues a method for execution. The method executes when a thread pool thread becomes available.</summary>
47 <param name="callBack">A <see cref="T:System.Threading.WaitCallback"></see> that represents the method to be executed.</param>
48 <returns>true if the method is successfully queued; <see cref="T:System.NotSupportedException"></see> is thrown if the work item could not be queued.</returns>
49 <exception cref="T:System.ArgumentNullException"><paramref name="callBack">callBack</paramref> is null.</exception>
50 <exception cref="T:System.NotSupportedException">The common language runtime (CLR) is hosted, and the host does not support this action.</exception>
52 <member name="M:System.Threading.ThreadPool.QueueUserWorkItem(System.Threading.WaitCallback,System.Object)">
53 <summary>Queues a method for execution, and specifies an object containing data to be used by the method. The method executes when a thread pool thread becomes available.</summary>
54 <param name="callBack">A <see cref="T:System.Threading.WaitCallback"></see> representing the method to execute.</param>
55 <param name="state">An object containing data to be used by the method.</param>
56 <returns>true if the method is successfully queued; <see cref="T:System.NotSupportedException"></see> is thrown if the work item could not be queued.</returns>
57 <exception cref="T:System.NotSupportedException">The common language runtime (CLR) is hosted, and the host does not support this action.</exception>
58 <exception cref="T:System.ArgumentNullException"><paramref name="callBack">callBack</paramref> is null.</exception>
60 <member name="M:System.Threading.ThreadPool.RegisterWaitForSingleObject(System.Threading.WaitHandle,System.Threading.WaitOrTimerCallback,System.Object,System.UInt32,System.Boolean)">
61 <summary>Registers a delegate to wait for a <see cref="T:System.Threading.WaitHandle"></see>, specifying a 32-bit unsigned integer for the time-out in milliseconds.</summary>
62 <param name="waitObject">The <see cref="T:System.Threading.WaitHandle"></see> to register. Use a <see cref="T:System.Threading.WaitHandle"></see> other than <see cref="T:System.Threading.Mutex"></see>.</param>
63 <param name="callBack">The <see cref="T:System.Threading.WaitOrTimerCallback"></see> delegate to call when the waitObject parameter is signaled.</param>
64 <param name="state">The object passed to the delegate.</param>
65 <param name="millisecondsTimeOutInterval">The time-out in milliseconds. If the millisecondsTimeOutInterval parameter is 0 (zero), the function tests the object's state and returns immediately. If millisecondsTimeOutInterval is -1, the function's time-out interval never elapses.</param>
66 <param name="executeOnlyOnce">true to indicate that the thread will no longer wait on the waitObject parameter after the delegate has been called; false to indicate that the timer is reset every time the wait operation completes until the wait is unregistered.</param>
67 <returns>The <see cref="T:System.Threading.RegisteredWaitHandle"></see> that can be used to cancel the registered wait operation.</returns>
68 <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="millisecondsTimeOutInterval">millisecondsTimeOutInterval</paramref> parameter is less than -1.</exception>
70 <member name="M:System.Threading.ThreadPool.RegisterWaitForSingleObject(System.Threading.WaitHandle,System.Threading.WaitOrTimerCallback,System.Object,System.TimeSpan,System.Boolean)">
71 <summary>Registers a delegate to wait for a <see cref="T:System.Threading.WaitHandle"></see>, specifying a <see cref="T:System.TimeSpan"></see> value for the time-out.</summary>
72 <param name="waitObject">The <see cref="T:System.Threading.WaitHandle"></see> to register. Use a <see cref="T:System.Threading.WaitHandle"></see> other than <see cref="T:System.Threading.Mutex"></see>.</param>
73 <param name="callBack">The <see cref="T:System.Threading.WaitOrTimerCallback"></see> delegate to call when the waitObject parameter is signaled.</param>
74 <param name="state">The object passed to the delegate.</param>
75 <param name="timeout">The time-out represented by a <see cref="T:System.TimeSpan"></see>. If timeout is 0 (zero), the function tests the object's state and returns immediately. If timeout is -1, the function's time-out interval never elapses.</param>
76 <param name="executeOnlyOnce">true to indicate that the thread will no longer wait on the waitObject parameter after the delegate has been called; false to indicate that the timer is reset every time the wait operation completes until the wait is unregistered.</param>
77 <returns>The <see cref="T:System.Threading.RegisteredWaitHandle"></see> that encapsulates the native handle.</returns>
78 <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="timeout">timeout</paramref> parameter is less than -1.</exception>
79 <exception cref="T:System.NotSupportedException">The <paramref name="timeout">timeout</paramref> parameter is greater than <see cref="F:System.Int32.MaxValue"></see>.</exception>
81 <member name="M:System.Threading.ThreadPool.RegisterWaitForSingleObject(System.Threading.WaitHandle,System.Threading.WaitOrTimerCallback,System.Object,System.Int32,System.Boolean)">
82 <summary>Registers a delegate to wait for a <see cref="T:System.Threading.WaitHandle"></see>, specifying a 32-bit signed integer for the time-out in milliseconds.</summary>
83 <param name="waitObject">The <see cref="T:System.Threading.WaitHandle"></see> to register. Use a <see cref="T:System.Threading.WaitHandle"></see> other than <see cref="T:System.Threading.Mutex"></see>.</param>
84 <param name="callBack">The <see cref="T:System.Threading.WaitOrTimerCallback"></see> delegate to call when the waitObject parameter is signaled.</param>
85 <param name="state">The object that is passed to the delegate.</param>
86 <param name="millisecondsTimeOutInterval">The time-out in milliseconds. If the millisecondsTimeOutInterval parameter is 0 (zero), the function tests the object's state and returns immediately. If millisecondsTimeOutInterval is -1, the function's time-out interval never elapses.</param>
87 <param name="executeOnlyOnce">true to indicate that the thread will no longer wait on the waitObject parameter after the delegate has been called; false to indicate that the timer is reset every time the wait operation completes until the wait is unregistered.</param>
88 <returns>The <see cref="T:System.Threading.RegisteredWaitHandle"></see> that encapsulates the native handle.</returns>
89 <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="millisecondsTimeOutInterval">millisecondsTimeOutInterval</paramref> parameter is less than -1.</exception>
91 <member name="M:System.Threading.ThreadPool.RegisterWaitForSingleObject(System.Threading.WaitHandle,System.Threading.WaitOrTimerCallback,System.Object,System.Int64,System.Boolean)">
92 <summary>Registers a delegate to wait for a <see cref="T:System.Threading.WaitHandle"></see>, specifying a 64-bit signed integer for the time-out in milliseconds.</summary>
93 <param name="waitObject">The <see cref="T:System.Threading.WaitHandle"></see> to register. Use a <see cref="T:System.Threading.WaitHandle"></see> other than <see cref="T:System.Threading.Mutex"></see>.</param>
94 <param name="callBack">The <see cref="T:System.Threading.WaitOrTimerCallback"></see> delegate to call when the waitObject parameter is signaled.</param>
95 <param name="state">The object passed to the delegate.</param>
96 <param name="millisecondsTimeOutInterval">The time-out in milliseconds. If the millisecondsTimeOutInterval parameter is 0 (zero), the function tests the object's state and returns immediately. If millisecondsTimeOutInterval is -1, the function's time-out interval never elapses.</param>
97 <param name="executeOnlyOnce">true to indicate that the thread will no longer wait on the waitObject parameter after the delegate has been called; false to indicate that the timer is reset every time the wait operation completes until the wait is unregistered.</param>
98 <returns>The <see cref="T:System.Threading.RegisteredWaitHandle"></see> that encapsulates the native handle.</returns>
99 <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="millisecondsTimeOutInterval">millisecondsTimeOutInterval</paramref> parameter is less than -1.</exception>
101 <member name="M:System.Threading.ThreadPool.SetMaxThreads(System.Int32,System.Int32)">
102 <summary>Sets 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.</summary>
103 <param name="workerThreads">The maximum number of worker threads in the thread pool.</param>
104 <param name="completionPortThreads">The maximum number of asynchronous I/O threads in the thread pool.</param>
105 <returns>true if the change is successful; otherwise, false.</returns>
107 <member name="M:System.Threading.ThreadPool.SetMinThreads(System.Int32,System.Int32)">
108 <summary>Sets the minimum number of threads the thread pool creates on demand, as new requests are made, before switching to an algorithm for managing thread creation and destruction.</summary>
109 <param name="workerThreads">The minimum number of worker threads that the thread pool creates on demand.</param>
110 <param name="completionPortThreads">The minimum number of asynchronous I/O threads that the thread pool creates on demand.</param>
111 <returns>true if the change is successful; otherwise, false.</returns>
113 <member name="M:System.Threading.ThreadPool.UnsafeQueueNativeOverlapped(System.Threading.NativeOverlapped*)">
114 <summary>Queues an overlapped I/O operation for execution.</summary>
115 <param name="overlapped">The <see cref="T:System.Threading.NativeOverlapped"></see> structure to queue.</param>
116 <returns>true if the operation was successfully queued to an I/O completion port; otherwise, false.</returns>
118 <member name="M:System.Threading.ThreadPool.UnsafeQueueUserWorkItem(System.Threading.WaitCallback,System.Object)">
119 <summary>Queues the specified delegate to the thread pool, but does not propagate the calling stack to the worker thread.</summary>
120 <param name="callBack">A <see cref="T:System.Threading.WaitCallback"></see> that represents the delegate to invoke when a thread in the thread pool picks up the work item.</param>
121 <param name="state">The object that is passed to the delegate when serviced from the thread pool.</param>
122 <returns>true if the method succeeds; <see cref="T:System.OutOfMemoryException"></see> is thrown if the work item could not be queued.</returns>
123 <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
124 <exception cref="T:System.ApplicationException">An out-of-memory condition was encountered.</exception>
125 <exception cref="T:System.OutOfMemoryException">The work item could not be queued.</exception>
126 <exception cref="T:System.ArgumentNullException"><paramref name="callBack">callBack</paramref> is null.</exception>
128 <member name="M:System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle,System.Threading.WaitOrTimerCallback,System.Object,System.TimeSpan,System.Boolean)">
129 <summary>Registers a delegate to wait for a <see cref="T:System.Threading.WaitHandle"></see>, specifying a <see cref="T:System.TimeSpan"></see> value for the time-out. This method does not propagate the calling stack to the worker thread.</summary>
130 <param name="waitObject">The <see cref="T:System.Threading.WaitHandle"></see> to register. Use a <see cref="T:System.Threading.WaitHandle"></see> other than <see cref="T:System.Threading.Mutex"></see>.</param>
131 <param name="callBack">The delegate to call when the waitObject parameter is signaled.</param>
132 <param name="state">The object that is passed to the delegate.</param>
133 <param name="timeout">The time-out represented by a <see cref="T:System.TimeSpan"></see>. If timeout is 0 (zero), the function tests the object's state and returns immediately. If timeout is -1, the function's time-out interval never elapses.</param>
134 <param name="executeOnlyOnce">true to indicate that the thread will no longer wait on the waitObject parameter after the delegate has been called; false to indicate that the timer is reset every time the wait operation completes until the wait is unregistered.</param>
135 <returns>The <see cref="T:System.Threading.RegisteredWaitHandle"></see> object that can be used to cancel the registered wait operation.</returns>
136 <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="timeout">timeout</paramref> parameter is less than -1.</exception>
137 <exception cref="T:System.NotSupportedException">The <paramref name="timeout">timeout</paramref> parameter is greater than <see cref="F:System.Int32.MaxValue"></see>.</exception>
138 <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
140 <member name="M:System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle,System.Threading.WaitOrTimerCallback,System.Object,System.Int32,System.Boolean)">
141 <summary>Registers a delegate to wait for a <see cref="T:System.Threading.WaitHandle"></see>, using a 32-bit signed integer for the time-out in milliseconds. This method does not propagate the calling stack to the worker thread.</summary>
142 <param name="waitObject">The <see cref="T:System.Threading.WaitHandle"></see> to register. Use a <see cref="T:System.Threading.WaitHandle"></see> other than <see cref="T:System.Threading.Mutex"></see>.</param>
143 <param name="callBack">The delegate to call when the waitObject parameter is signaled.</param>
144 <param name="state">The object that is passed to the delegate.</param>
145 <param name="millisecondsTimeOutInterval">The time-out in milliseconds. If the millisecondsTimeOutInterval parameter is 0 (zero), the function tests the object's state and returns immediately. If millisecondsTimeOutInterval is -1, the function's time-out interval never elapses.</param>
146 <param name="executeOnlyOnce">true to indicate that the thread will no longer wait on the waitObject parameter after the delegate has been called; false to indicate that the timer is reset every time the wait operation completes until the wait is unregistered.</param>
147 <returns>The <see cref="T:System.Threading.RegisteredWaitHandle"></see> object that can be used to cancel the registered wait operation.</returns>
148 <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="millisecondsTimeOutInterval">millisecondsTimeOutInterval</paramref> parameter is less than -1.</exception>
149 <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
151 <member name="M:System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle,System.Threading.WaitOrTimerCallback,System.Object,System.Int64,System.Boolean)">
152 <summary>Registers a delegate to wait for a <see cref="T:System.Threading.WaitHandle"></see>, specifying a 64-bit signed integer for the time-out in milliseconds. This method does not propagate the calling stack to the worker thread.</summary>
153 <param name="waitObject">The <see cref="T:System.Threading.WaitHandle"></see> to register. Use a <see cref="T:System.Threading.WaitHandle"></see> other than <see cref="T:System.Threading.Mutex"></see>.</param>
154 <param name="callBack">The delegate to call when the waitObject parameter is signaled.</param>
155 <param name="state">The object that is passed to the delegate.</param>
156 <param name="millisecondsTimeOutInterval">The time-out in milliseconds. If the millisecondsTimeOutInterval parameter is 0 (zero), the function tests the object's state and returns immediately. If millisecondsTimeOutInterval is -1, the function's time-out interval never elapses.</param>
157 <param name="executeOnlyOnce">true to indicate that the thread will no longer wait on the waitObject parameter after the delegate has been called; false to indicate that the timer is reset every time the wait operation completes until the wait is unregistered.</param>
158 <returns>The <see cref="T:System.Threading.RegisteredWaitHandle"></see> object that can be used to cancel the registered wait operation.</returns>
159 <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="millisecondsTimeOutInterval">millisecondsTimeOutInterval</paramref> parameter is less than -1.</exception>
160 <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
162 <member name="M:System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle,System.Threading.WaitOrTimerCallback,System.Object,System.UInt32,System.Boolean)">
163 <summary>Registers a delegate to wait for a <see cref="T:System.Threading.WaitHandle"></see>, specifying a 32-bit unsigned integer for the time-out in milliseconds. This method does not propagate the calling stack to the worker thread.</summary>
164 <param name="waitObject">The <see cref="T:System.Threading.WaitHandle"></see> to register. Use a <see cref="T:System.Threading.WaitHandle"></see> other than <see cref="T:System.Threading.Mutex"></see>.</param>
165 <param name="callBack">The delegate to call when the waitObject parameter is signaled.</param>
166 <param name="state">The object that is passed to the delegate.</param>
167 <param name="millisecondsTimeOutInterval">The time-out in milliseconds. If the millisecondsTimeOutInterval parameter is 0 (zero), the function tests the object's state and returns immediately. If millisecondsTimeOutInterval is -1, the function's time-out interval never elapses.</param>
168 <param name="executeOnlyOnce">true to indicate that the thread will no longer wait on the waitObject parameter after the delegate has been called; false to indicate that the timer is reset every time the wait operation completes until the wait is unregistered.</param>
169 <returns>The <see cref="T:System.Threading.RegisteredWaitHandle"></see> object that can be used to cancel the registered wait operation.</returns>
170 <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
172 <member name="T:System.Threading.WaitCallback">
173 <summary>Represents a callback method to be executed by a thread pool thread.</summary>
174 <param name="state">An object containing information to be used by the callback method.</param>
176 <member name="T:System.Threading.WaitOrTimerCallback">
177 <summary>Represents a method to be called when a <see cref="T:System.Threading.WaitHandle"></see> is signaled or times out.</summary>
178 <param name="state">An object containing information to be used by the callback method each time it executes.</param>
179 <param name="timedOut">true if the <see cref="T:System.Threading.WaitHandle"></see> timed out; false if it was signaled.</param>