Re: Running concurrent Mulithreaded Application
Re: Running concurrent Mulithreaded Application
- Subject: Re: Running concurrent Mulithreaded Application
- From: LD <email@hidden>
- Date: Thu, 1 Sep 2005 10:32:56 +1000
Hi Mike,
On 01/09/2005, at 3:36 AM, Mike Schrag wrote:
Only true if the monitor lock is not implied. i.e., synchronized
methods imply that object "this" is accessible by no-other-objects
whilst that thread has the lock. Whilst no threads are accessing
the locked portions then readC is concurrent. When they are, readC
is blocked.
Only synchronized blocks and methods that share the same monitor
will block each other. An unsynchronized method has no monitor on
it and therefore can be called any time regardless of the state of
the instance monitor.
Woops, sorry 'bout that - there's my fuzzy memory on my reader/writer
studies with Java ;-). Thanks for the clarification.
Still it ought to be used sparingly for methods as it only provides
for a single re-entrant monitor lock which isn't great if you're
wanting to allow multiple readers to the data, blocked while a single
writer writes, etc
with regards,
--
LD
_______________________________________________
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