Forums Register Login

Can we use ReentrantReadWriteLock ?

+Pie Number of slices to send: Send
ReadWriteLock was added after J2SE 1.5.
If I use the latest version(J2Se1.6), then may I use ReadWriteLock of java.util.concurrent.locks ?
Of cource, I never use it in Lock/Unlock Method.

I want to use it in read/update/create/delete.
[ February 21, 2007: Message edited by: james bonds ]
+Pie Number of slices to send: Send
Hi,

it's part of the standard API so yes.

Why can't you use it in lock/unlock?

David
+Pie Number of slices to send: Send
ReadWriteLock and all the concurrent lock stuff were added in 5.0, not 6.0, so yes, that's perfectly valid.

-- Vince
SCJP(1.4), SCWCD(1.4), SCJD(almost there!)
+Pie Number of slices to send: Send
sure. I am using it - it is easy and nice
This is also very easy to keep trace of threads waiting for the particular row.
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 703 times.
Similar Threads
Use Read / Write lock patern permitted ?
ReadWriteLocks
ReadWriteLock in I/O Access
RMI and ReadWriteLock pattern
Concurrency Patterns
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:16:54.