aspose file tools*
The moose likes Threads and Synchronization and the fly likes exclusive access to change a variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "exclusive access to change a variable" Watch "exclusive access to change a variable" New topic
Author

exclusive access to change a variable

abhijatalok alok
Greenhorn

Joined: Jul 15, 2009
Posts: 7
I have a multi-threaded app and a method requires exclusive access to change a variable. How do I ensure that?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

Moving to a forum dedicated to these questions: Threads and Synchronization. The latter word is what you'll need.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Edward Harned
Ranch Hand

Joined: Sep 19, 2005
Posts: 291

Use java.util.concurrent.Atomic... or synchronization


Ed's latest article: A Java Parallel Calamity http://coopsoft.com/ar/Calamity2Article.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exclusive access to change a variable