Skip to content
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

Is it safe to do this volatile++ operation in WebSocketBuffer? #103907

Open
omajid opened this issue Jun 24, 2024 · 2 comments
Open

Is it safe to do this volatile++ operation in WebSocketBuffer? #103907

omajid opened this issue Jun 24, 2024 · 2 comments
Labels
area-System.Net untriaged New issue has not been triaged by the area owner

Comments

@omajid
Copy link
Member

omajid commented Jun 24, 2024

It looks like this class tries to stick to atomic operations, but this operation seems like it could store the wrong values in the presence of multiple threads.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jun 24, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@stephentoub
Copy link
Member

Looks fine to me. I'm not really sure why it's volatile in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Net untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants