Erik Axel Nielsen wrote:
On 25. mai. 2006, at 17.42, Geir Magnusson Jr wrote:
Time for me to learn something - I thought there was only one monitor
per object.... how can different threads get different locks?
Hi, as I understand it, you use final on monitors to prevent the
following from happening:
Let's say you have a monitor:
private Object monitor;
Then you somewhere have:
public foo() {
monitor = new Object();
}
If by any chance foo() should be called twice you in effect have two
monitors around.
Got it. Thanks. I thought it was something more subtle.
geir
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]