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 - OCEJPAD 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 Reactive Generator
I agree. Here's the link:
subject: exclusive access to change a variable
Locking - Notification issues
volatile key word
threadsafety of a singleton
Connection Object for lock/unlock...?
Thread and variable value question?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015