Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Smaug123 wants to merge1 commit intodotnet:main
base:main
Choose a base branch
Loading
fromSmaug123:failure-modes-of-concurrent

Conversation

Smaug123
Copy link
Contributor

Summary

The docs are currently silent on the failure modes of most of theSystem.Collections.Generic.ConcurrentQueue.Try* methods. This PR clarifies what I believe are the semantics: that theTry operations can only fail for the trivial reason that the queue was empty at the time the operation was attempted.

@Smaug123Smaug123 requested a review froma team as acode ownerJuly 19, 2025 07:15
@dotnet-policy-servicedotnet-policy-servicebot added the community-contributionIndicates that the PR has been added by a community member labelJul 19, 2025
@dotnet-policy-serviceDotnet Policy Service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-collections

@@ -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:System.Collections.Concurrent.ConcurrentQueue%601>.)</returns>
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thisis mentioned in the remarks section below, but that is not the first place I looked for the answer, suggesting that more docs are required.

@Smaug123Smaug123force-pushed thefailure-modes-of-concurrent branch from22ab3e8 to6b8088dCompareJuly 19, 2025 07:24
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
area-System.Collectionscommunity-contributionIndicates that the PR has been added by a community member
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@Smaug123

[8]ページ先頭

©2009-2025 Movatter.jp