Re: Running concurrent Mulithreaded Application
Re: Running concurrent Mulithreaded Application
- Subject: Re: Running concurrent Mulithreaded Application
- From: Mike Schrag <email@hidden>
- Date: Wed, 31 Aug 2005 12:32:18 -0400
Just to clarify -- synchronized blocks and methods block access to all other synchronized blocks that share the same monitor lock, not all methods on the instance. For instance, in that previous example, readC is not synchronized and therefore is not blocked by the synchronized keywords on the other methods.
ms On Aug 31, 2005, at 12:19 PM, LD wrote:
Unfortunately, Java's synchronized keyword lends itself to abuse unless you understand what it's doing. You need to understand that the synchronized methods block all access to the instance until that lone thread has left the building! Doing this on your Application instance is probably less than desirable.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden