| 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: 19216
|
|
|
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
How To Ask Questions How To Answer Questions
|
 |
Edward Harned
Ranch Hand
Joined: Sep 19, 2005
Posts: 288
|
|
|
Use java.util.concurrent.Atomic... or synchronization
|
Ed's latest article: A Java Parallel Calamity http://coopsoft.com/ar/Calamity2Article.html
|
 |
 |
|
|
subject: exclusive access to change a variable
|
|
|