• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sychronizing the method  RSS feed

 
Raj chiru
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..
my question is How can you synchronize the block (or)method with out using synchronized?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whats wrong with synchronized?
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since Java 5.0 you can use the Lock interface and its implementations. Before that, synchronized was the only way.
 
gupta arvind
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use java.util.concurrent.locks.Lock

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!