On Wed, May 30, 2012 at 5:30 PM, Steven Schveighoffer <schvei...@yahoo.com> wrote: > All deadlocks involving A and B mutexes. Or if not, can you show how? I > can't see it. > > -Steve
This can cause a deadlock because locking order is not guaranteed, no? synchronized class A { void delegate(B b) { b.call() } void call() {} } synchronized class B { void delegate(A a) { a.call() } void call() {} } Thanks, -Jose PS. This may not compile not sure if it should be 'void delegate(shared B b)', etc.