Skip to content

Commit 22ab3e8

Browse files
committed
Add info about failure modes to ConcurrentQueue Try methods
1 parent 651ae50 commit 22ab3e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xml/System.Collections.Concurrent/ConcurrentQueue`1.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@
551551
<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>
552552
<summary>Attempts to add an object to the <see cref="T:System.Collections.Concurrent.IProducerConsumerCollection`1" />.</summary>
553553
<returns>
554-
<see langword="true" /> if the object was added successfully; otherwise, <see langword="false" />.</returns>
554+
<see langword="true" /> if the object was added successfully; otherwise, <see langword="false" />. (This operation never returns <see langword="false" /> for <xref:System.Collections.Concurrent.ConcurrentQueue%601>.)</returns>
555555
<remarks>
556556
<format type="text/markdown"><![CDATA[
557557
@@ -614,7 +614,7 @@
614614
<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>
615615
<summary>Attempts to remove and return an object from the <see cref="T:System.Collections.Concurrent.IProducerConsumerCollection`1" />.</summary>
616616
<returns>
617-
<see langword="true" /> if an element was removed and returned successfully; otherwise, <see langword="false" />.</returns>
617+
<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>
618618
<remarks>
619619
<format type="text/markdown"><![CDATA[
620620
@@ -932,7 +932,7 @@ This member is an explicit interface member implementation. It can be used only
932932
<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>
933933
<summary>Tries to remove and return the object at the beginning of the concurrent queue.</summary>
934934
<returns>
935-
<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>
935+
<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>
936936
<remarks>
937937
<format type="text/markdown"><![CDATA[
938938
@@ -994,7 +994,7 @@ This member is an explicit interface member implementation. It can be used only
994994
<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>
995995
<summary>Tries to return an object from the beginning of the <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1" /> without removing it.</summary>
996996
<returns>
997-
<see langword="true" /> if an object was returned successfully; otherwise, <see langword="false" />.</returns>
997+
<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>
998998
<remarks>
999999
<format type="text/markdown"><![CDATA[
10001000

0 commit comments

Comments
 (0)