-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve async lock #1520
Improve async lock #1520
Conversation
Should the |
Why do you think so? The field is atomic to there is no need to lock first in my opinion. |
I was thinking about multithreaded access where the bool is modified in one thread, then sits in a register and another thread reads a stale value. Maybe the bool could be declared as |
Makes sense. I will move it for sure. |
Improve async lock (dotnet#1520)
This pull request adds a new implementation of the Async Lock which has no longer a dead lock issue.