In several classes the statement `lock (this)` is used to attempt synchronization of resource access. If this experiences a deadlock, since the majority of the functionality occurs on the calling thread instead of being immediately dispatched, it could cause problems in the calling application.
There are exceedingly rare cases where its safe to lock on `this` or `Me` and none of the usages in this codebase meet those criteria.
This should be triggering violations of CA2002. Some of the affected classes include
- etc.. full list at https://github.com/apache/logging-log4net/search?q=%22lock+%28this%29%22
This is probably best converted into an Epic or Story with a bug created for each part that requires fixing, but I will leave that to someone more familiar with this project's workflow.