harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@pobox.com>
Subject Re: [website] harmony-dev agreements and recommendations
Date Thu, 25 May 2006 20:34:11 GMT


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: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message