1. State-of-the-art garbage collectors, which enable good implementations of lock-free data structures.
2. Excellent implementations of lock-free data structures (like ConcurrentLinkedQueue and ConcurrentSkipListMap) and other concurrent data structures (like ConcurrentHashMap).
3. A state-of-the-art work-stealing scheduler (ForkJoinPool), excellent for both parallelism (as used by Java 8's streams) and concurrency.
4. A cross-platform memory model specifying memory visibility across threads.
5. Access to CPU concurrency primitives like CAS and memory fences.
These building blocks are a great foundation for any concurrent application.
That's true for any language, and any platform. The language can't save you from having to, at some point, understand how to properly engineer software.
Could you please elaborate on #5? What you mean there is the fact that AtomicInteger implementation is actually using this primitives on your target platform, correct?
It's more than that. AtomicInteger's implementation uses JVM intrinsics which are calls to methods in the sun.misc.Unsafe class, that, when JITted, are replaced by a platform specific machine instruction (where available), such as CAS or a memory fence.
1. State-of-the-art garbage collectors, which enable good implementations of lock-free data structures.
2. Excellent implementations of lock-free data structures (like ConcurrentLinkedQueue and ConcurrentSkipListMap) and other concurrent data structures (like ConcurrentHashMap).
3. A state-of-the-art work-stealing scheduler (ForkJoinPool), excellent for both parallelism (as used by Java 8's streams) and concurrency.
4. A cross-platform memory model specifying memory visibility across threads.
5. Access to CPU concurrency primitives like CAS and memory fences.
These building blocks are a great foundation for any concurrent application.