Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we use ReentrantReadWriteLock ?

 
james bonds
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
David A. Scott
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

it's part of the standard API so yes.

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

David
 
Vincent Li
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!)
 
Maciej Miklas
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic