asmhatreandClaude Sonnet 5 202f2f18a5 concurrency-interview: companion code for the Top 40 interview post
Adds the concurrency-interview module: a real race condition with its
actual lost-update count, why volatile alone doesn't fix it, a real
JVM-detected deadlock (ThreadMXBean.findDeadlockedThreads()) with the
fix, and ScopedValue's exact child-thread inheritance rules (finalized
in JDK 25 via JEP 506, demonstrated against StructuredTaskScope, still
preview per JEP 505/525). 4 runnable demos, 1 JUnit test class (9
tests), 5 captured output transcripts.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FhzLY5p6okFva3qsnsRyvM
2026-09-30 07:25:12 +00:00

java-core-examples

Runnable companion code for ankurm.com's Java-core / concurrency series. One Maven module per article; each module's own README has that article's version table, quickstart, and traps.

Module Post
jmm The Java Memory Model Explained: volatile, happens-before, and Why Your Double-Checked Lock Failed
locks synchronized vs ReentrantLock vs StampedLock: Benchmarks and a Decision Table
atomics Java Atomics and VarHandle: CAS, LongAdder, and When Atomics Beat Locks
vt-pinning Diagnosing Virtual Thread Pinning in Production: JFR Events, jcmd, and Real Fixes
synchronizers CountDownLatch vs CyclicBarrier vs Phaser vs Semaphore in Java
executors ExecutorService Done Right: Shutdown, try-with-resources and Virtual Thread Executors
concurrency-interview Top 40 Java Concurrency Interview Questions and Answers (2026)

License

MIT - see LICENSE.

S
Description
Runnable companion code for ankurm.com's Java-core / concurrency series.
Readme MIT
288 KiB
Languages
Java 87.3%
Shell 12%
C 0.7%