a question regarding nested synchronized()
Hi
Say a Thread does:===========
synchronized(objectA)
{
....Something
synchronized(objectB)
{
....Something
objectB.wait()
}
}
my questions:
1. is the command objectB.wait();, which is called by the thread , releasing the lock on object A too, or does objectA remains locked
since it is not the monitor used for the wait() ? (My guess is that objectA remains locked)
2. If the answer to 1. is yes, in which order are the locks released ?
Regrds,
Yechiel Fefer
_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest