SumoLogic / sumologic-net-appenders

Several appenders for .NET developers to use that send logs straight to SumoLogic.
Apache License 2.0
23 stars 39 forks source link

Locking on a private dummy object to conform to correct usage of locking #27

Closed billpratt closed 7 years ago

billpratt commented 7 years ago

To prevent potential dead locks, it is recommended to not use MethodImplOptions.Synchronized nor lock(this). Instead, you should lock on a private dummy object.

See here for more info: https://blogs.msdn.microsoft.com/bclteam/2004/01/20/lock-vs-methodimploptions-synchronized-kit-george/

billpratt commented 7 years ago

@latkin

latkin commented 7 years ago

LGTM, thanks