Java
9 items using Java
Blog Posts
Java Concurrency Series, Part 8: Virtual Threads & Project Loom
What changes when threads become cheap? Understand carrier threads, continuations, pinning, StructuredTaskScope, and how virtual threads flip the economics of I/O-bound Java services.
Java Concurrency Series, Part 7: Concurrent Collections
Why can't you just wrap a HashMap in synchronized? Explore ConcurrentHashMap's node-level locking, CopyOnWriteArrayList's snapshot semantics, BlockingQueue variants, and a contention benchmark.
Java Concurrency Series, Part 6: Thread Pools & Executors
Why does tuning your thread pool size matter? Understand ThreadPoolExecutor internals, queue types, rejection policies, ForkJoinPool work-stealing, and CompletableFuture async pipelines.
Java Concurrency Series, Part 5: Atomic Operations & Lock-Free Programming
How can you update shared state without any lock? Understand the CAS CPU instruction, AtomicInteger, the ABA problem, LongAdder's striping trick, and VarHandle memory access modes.
Java Concurrency Series, Part 4: java.util.concurrent Building Blocks
Why does ReentrantLock exist if synchronized works? Explore tryLock, StampedLock optimistic reads, Condition variables, and LockSupport — the primitives that underpin all of java.util.concurrent.
Java Concurrency Series, Part 3: synchronized & Intrinsic Locks
What does synchronized actually do at the JVM level? Explore object headers, lock state inflation from biased to fat locks, wait/notify semantics, and deadlock diagnosis with jstack.
Java Concurrency Series, Part 2: The Java Memory Model & Visibility
Why can a thread see stale data written by another? Understand CPU caches, write buffers, instruction reordering, and the happens-before relation that makes volatile work.
Java Concurrency Series, Part 1: Threads, the OS, and the JVM
What really happens when you call new Thread().start()? Trace the path from Java to the OS kernel, understand thread lifecycle states, and use jstack to observe live threads.
Java Concurrency Series, Part 0: Overview
A roadmap through Java concurrency — from threads and the memory model to virtual threads. Why getting concurrency right is hard, and what you'll learn.