Maybe I'm displaying gross ignorance here but AFAIK a synchronized block
grabs the object's monitor and blocks other threads from calling
*synchronized* methods on that object, right? Unsynchronized methods on
that object can be called at will.
I'm looking at LookupDispatchAction for PR #16019 and it has some strange
synchronized blocks. It synchronizes on HashMap objects which contain no
synchronized methods. Can anyone explain this to me?
I believe the Maps should be defined as Collections.synchronizedMap(new
HashMap()); This alleviates the need for one of the synchronized blocks but
the other is still needed because it Iterates over the key Set.
Thanks,
Dave
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
- Re: Synchronized blocks? David Graham
- Re: Synchronized blocks? Craig R. McClanahan
- Re: Synchronized blocks? Craig R. McClanahan
- Re: Synchronized blocks? V. Cekvenich
- RE: Synchronized blocks? Mark Galbreath
- Re: Synchronized blocks? David Graham
- Re: Synchronized blocks? David Graham
- RE: Synchronized blocks? Andrew Hill