Home > Back-end >  Synchronized method nested inside a synchronized code block, so if we can on two locks?
Synchronized method nested inside a synchronized code block, so if we can on two locks?

Time:04-21

  nested inside a synchronized method synchronized code block, so if we can on two locks?
Non static synchronized methods lock this is this kind of object, a synchronized block of code to create an object ACTS as a lock, and it can realize two locks the?

CodePudding user response:

Yes, two locks, the first is this, the second is the new object
  • Related