I faced the following code in our project:
synchronized (Thread.currentThread()){ //some code }
I don\'t understand the reason to use s
You are implementing a recursive mutex.
i.e. the same thread can enter the synchronisation block, but not other threads.