Which of the following two code snippets is better to use?
static readonly object _locker = new object();
lock (_locker)
or
lock (this)
this is an object of the current instance. So why is lock (_locker) always in the books?
Related:
What is the difference between lock(this) and lock(thisLock)?
Why is lock(this) {…} bad?