File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Threads and Synchronization
exclusive access to change a variable
Joined: Jul 15, 2009
Aug 13, 2010 05:41:48
I have a multi-threaded app and a method requires exclusive access to change a variable. How do I ensure that?
Joined: Oct 27, 2005
Aug 13, 2010 06:22:23
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
Joined: Sep 19, 2005
Aug 13, 2010 07:45:47
Use java.util.concurrent.Atomic... or synchronization
Ed's latest article: A Java Parallel Calamity
I agree. Here's the link:
subject: exclusive access to change a variable
Mock Exam Q
Netbeans 4.0 - private/public access problem
Super constructor + instance methods/variables (K&B)
WA #1.....word association
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014