You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Threading/ThreadPool.xml
+20-7Lines changed: 20 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -669,7 +669,7 @@ If a thread pool implementation may have different types of work items, the coun
669
669
<typeparamname="TState">The type of elements of <paramrefname="state" />.</typeparam>
670
670
<paramname="callBack">An <seecref="T:System.Action`1" /> representing the method to execute.</param>
671
671
<paramname="state">An object containing data to be used by the method.</param>
672
-
<paramname="preferLocal">Unlike other QueueUserWorkItem methods, prefer executing in the local thread pool and not the global thread pool.</param>
672
+
<paramname="preferLocal"><seelangword="true" /> to prefer queueing the work item in a queue close to the current thread; <seelangword="false" /> to prefer queueing the work item to the thread pool's shared queue.</param>
673
673
<summary>Queues a method specified by an <seecref="T:System.Action`1" /> delegate for execution, and provides data to be used by the method. The method executes when a thread pool thread becomes available.</summary>
674
674
<returns>
675
675
<seelangword="true" /> if the method is successfully queued; <seecref="T:System.NotSupportedException" /> is thrown if the work item could not be queued.
@@ -1285,11 +1285,22 @@ If a thread pool implementation may have different types of threads, the count i
<paramname="callBack">The work item to invoke when a thread in the thread pool picks up the work item.</param>
1289
+
<paramname="preferLocal"><seelangword="true" /> to prefer queueing the work item in a queue close to the current thread; <seelangword="false" /> to prefer queueing the work item to the thread pool's shared queue.</param>
1290
+
<summary>Queues the specified work item object to the thread pool.</summary>
1291
+
<returns><seelangword="true" /> if the method succeeds; <seecref="T:System.OutOfMemoryException" /> is thrown if the work item could not be queued.</returns>
1292
+
<remarks>
1293
+
<formattype="text/markdown"><![CDATA[
1294
+
1295
+
## Remarks
1296
+
1297
+
The thread pool will invoke the work item's <xref:System.Threading.IThreadPoolWorkItem.Execute> method. It is the responsibility of that work item to propagate <xref:System.Threading.ExecutionContext> if it's needed; the thread pool will not do so.
1298
+
1299
+
]]></format>
1300
+
</remarks>
1301
+
<exceptioncref="T:System.ArgumentNullException"><paramrefname="callback" /> is <seelangword="null" />.</exception>
1302
+
<exceptioncref="T:System.ArgumentOutOfRangeException">The work item is a <seecref="T:System.Threading.Tasks.Task" />.</exception>
1303
+
<exceptioncref="T:System.OutOfMemoryException">The work item could not be queued.</exception>
1293
1304
</Docs>
1294
1305
</Member>
1295
1306
<MemberMemberName="UnsafeQueueUserWorkItem">
@@ -1388,11 +1399,13 @@ If a thread pool implementation may have different types of threads, the count i
1388
1399
<typeparamname="TState">The type of elements of <paramrefname="state" />.</typeparam>
1389
1400
<paramname="callBack">A delegate representing the method to execute.</param>
1390
1401
<paramname="state">An object containing data to be used by the method.</param>
1391
-
<paramname="preferLocal">`true` to execute in the local threadpool; `false` to execute in the global thread pool.</param>
1402
+
<paramname="preferLocal"><seelangword="true" /> to prefer queueing the work item in a queue close to the current thread; <seelangword="false" /> to prefer queueing the work item to the thread pool's shared queue.</param>
1392
1403
<summary>Queues a method specified by an <seecref="T:System.Action`1" /> delegate 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>
1393
1404
<returns>
1394
1405
<seelangword="true" /> if the method is successfully queued; <seecref="T:System.NotSupportedException" /> is thrown if the work item could not be queued.</returns>
1395
1406
<remarks>To be added.</remarks>
1407
+
<exceptioncref="T:System.ArgumentNullException"><paramrefname="callback" /> is <seelangword="null" />.</exception>
1408
+
<exceptioncref="T:System.NotSupportedException">The work item could not be queued.</exception>
0 commit comments