The Artima Developer Community
Sponsored Link

Conflicting advice (or have I a bad memory)?

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Conflicting advice (or have I a bad memory)?

Posted by Bengt Kleberg on 16 Jul 1998, 12:54 AM

Greetings,

Some time ago I think I read an article (paper magazine) that dealt with
syncronisation. It seems to me that this article advocated putting the
"syncronized" keyword not on the critical sections themselfs, but instead
on methods. The idea was that the syncronisation overhead made this
a faster approach.
Note that the example had _several_ critical sections in each method.

So, my question then: Is the idea of syncronising methods instead of critical
sections just unneccessary sub optimising? Or does it have merit in the case
of several critical sections in one method?



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us