Locks On Objects With Weak Identities - prodot/ReCommended-Extension GitHub Wiki

The following object types should never be used as lock monitors:

  • string
  • arrays of value types
  • MarshalByRefObject derivatives
  • ExecutionEngineException
  • OutOfMemoryException or derivatives
  • StackOverflowException
  • MemberInfo derivatives
  • ParameterInfo or derivatives
  • Thread
  • this

Note

The analyzer can be configured or deactivated in the ReSharper Options or Rider Settings dialog.

References

⚠️ **GitHub.com Fallback** ⚠️