do synchronized java methods queue calls?
问题 I've read the oracle doc about synchronized methods and how they may introduce a lock to the multithreaded program, but there is one thing that is unclear to me. Are the subsequent calls to an already locked methods queued? Lets say we have a class: class Astore { ... public synchronized void a() { doSomethingTimeConsuming(); } ... } and 3 threads that call astore.a() final Astore astore = new Astore(); Thread t1 = new Thread(new Runnable() { public void run() { astore.a(); doSomethingElse();