-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Optimize Interlocked.CompareExchange use in Task #93953
Conversation
Tagging subscribers to this area: @dotnet/area-system-threading-tasks Issue DetailsAlways use
|
src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@pentp, just wanted to make sure you had seen Stephen's comments. Are you planning on fixing those here in this PR or would you prefer to push up a second PR after this one is merged since they're relatively minor? |
53a3515
to
6f585b1
Compare
Always use
Interlocked.CompareExchange
result when possible instead of re-reading the value.Use
m_stateObject
for storingWhenAllPromise
failed/canceled tasks.