Quantcast
Channel: Is there a better AtomicInteger compare feature for race conditions? - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Gray for Is there a better AtomicInteger compare feature for race...

Is it possible to do this without using synchronized? Is there, for instance, an extended AtomicInteger class with a more powerful compareAndSet?You should be able to do that without a synchronized...

View Article



Is there a better AtomicInteger compare feature for race conditions?

I am trying to write a decorator to an existing class that rejects if there are not enough resources available. Here is an example version of the code with no multithreading at all:public interface...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images