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 15:42:41 GMT

Mikhail Fursov wrote:
> On 5/25/06, Mikhail Loenko <mloenko@gmail.com> wrote:
>> > 2) Try to make all objects used for synchronization 'final'  (we have a
>> lot
>> > of non-final monitors in API, so we give a chance to bugs)
>> Could you please explain with details and an example?
> This is not a bug (E.g. ExemptionMechanism:47, BeanContextSupport:149) but
> such code may lead (in theory or in future) to deadlock because it allows
> different threads to use different locks in the same object instance. Also
> when you analyse 'synchronized' pattern the 'final' modifier for a lock
> really helps in understanding code and locks logic.

Time for me to learn something - I thought there was only one monitor 
per object.... how can different threads get different locks?


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

View raw message