Fix warning CA2002: Do not lock on objects with weak identity#184
Fix warning CA2002: Do not lock on objects with weak identity#184mattwar merged 1 commit intodotnet:masterfrom zerhacken:dev/lock-private-object
Conversation
There was a problem hiding this comment.
Could you use the name gate here instead? I believe that is the verbiage we most commonly associate with object values used only in lock statements.
|
Thanks for doing this. Left some minor comments on the change. I think this will be good to go once we are in a position to accept PR's (very, very soon). |
|
Changed field name from "lockable" to "_gate" and fixed comment (maintained "lock(gate) on access") |
There was a problem hiding this comment.
Comment isn't really needed, but XML doc comments would be more appropriate if you're going to keep them. IDE goodness and all. Ditto for everything else.
|
@jasonmalinowski fixed comments to XML doc, if a commentless fix is preferred I will of course remove them as necessary. I would personally keep the comments as a fair warning. |
|
👍 |
This commit changes 'lock (this)' usage into a lock on a private object which only instance is knowledgeable about.
|
git fetch upstream |
Fix warning CA2002: Do not lock on objects with weak identity
|
@zerhacken - If you haven't already, can you please sign the CLA here - https://cla2.dotnetfoundation.org ? |
Update .NET SDK to 9.0.203
This commit changes 'lock (this)' usage into a lock on a private
object which only instance is knowledgeable about.