Skip to content

Add info about failure modes to ConcurrentQueue Try methods #11588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions xml/System.Collections.Concurrent/ConcurrentQueue`1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@
<param name="item">The object to add to the <see cref="T:System.Collections.Concurrent.IProducerConsumerCollection`1" />. The value can be a null reference (Nothing in Visual Basic) for reference types.</param>
<summary>Attempts to add an object to the <see cref="T:System.Collections.Concurrent.IProducerConsumerCollection`1" />.</summary>
<returns>
<see langword="true" /> if the object was added successfully; otherwise, <see langword="false" />.</returns>
<see langword="true" /> if the object was added successfully; otherwise, <see langword="false" />. (This operation never returns <see langword="false" /> for <xref cref="System.Collections.Concurrent.ConcurrentQueue`1"/>.)</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -614,7 +614,7 @@
<param name="item">When this method returns, if the operation was successful, <paramref name="item" /> contains the object removed. If no object was available to be removed, the value is unspecified.</param>
<summary>Attempts to remove and return an object from the <see cref="T:System.Collections.Concurrent.IProducerConsumerCollection`1" />.</summary>
<returns>
<see langword="true" /> if an element was removed and returned successfully; otherwise, <see langword="false" />.</returns>
<see langword="true" /> if an element was removed and returned successfully; otherwise, <see langword="false" /> (that is, if there were no elements in the queue at the instant the call tried to take an element).</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -932,7 +932,7 @@ This member is an explicit interface member implementation. It can be used only
<param name="result">When this method returns, if the operation was successful, <paramref name="result" /> contains the object removed. If no object was available to be removed, the value is unspecified.</param>
<summary>Tries to remove and return the object at the beginning of the concurrent queue.</summary>
<returns>
<see langword="true" /> if an element was removed and returned from the beginning of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> successfully; otherwise, <see langword="false" />.</returns>
<see langword="true" /> if an element was removed and returned from the beginning of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> successfully; otherwise, <see langword="false" /> (that is, if there were no elements in the queue at the instant the call tried to dequeue).</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -994,7 +994,7 @@ This member is an explicit interface member implementation. It can be used only
<param name="result">When this method returns, <paramref name="result" /> contains an object from the beginning of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> or an unspecified value if the operation failed.</param>
<summary>Tries to return an object from the beginning of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> without removing it.</summary>
<returns>
<see langword="true" /> if an object was returned successfully; otherwise, <see langword="false" />.</returns>
<see langword="true" /> if an object was returned successfully; otherwise, <see langword="false" /> (that is, if there were no elements in the queue at the instant the call tried to peek).</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down