This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Purpose of lock() and unlock()  RSS feed

 
Bryon Phinney
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the purpose of the lock() and unlock() methods? Isn't it possible to use a Reader/Writer lock pattern and not need to keep track of which records are locked but still retain the desired effect?
I am looking at using Allen Holub's version of this pattern from "Taming Java Threads" and I don't see a need for these two methods.
somebody pull me from my ignorance.
Thanks
Bryon
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!