ExecutorService Shutdown: shutdown, shutdownNow and close()
ExecutorService shutdown in Java, tested: what shutdown(), shutdownNow() and close() promise, why a JVM stays alive, and the two-phase routine I use.
ExecutorService shutdown in Java, tested: what shutdown(), shutdownNow() and close() promise, why a JVM stays alive, and the two-phase routine I use.
How ForkJoinPool really works: work-stealing deques, the common pool's size, and which blocking calls get a spare thread and which quietly stall it.
wait() and notify() hang or corrupt data when the guard, the lock or the wakeup is wrong. Lost signals, stolen wakeups and notify vs notifyAll, run on JDK 21.
On JDK 21, with the virtual-thread scheduler pinned to one carrier thread, four virtual threads that each do Thread.
Why one thread can't see another thread's write. The Java Memory Model, reordering, and every happens-before rule explained with code you can actually test.
A Java condition variable gives one lock several wait sets. How await() and signal() work, why one Condition hangs a buffer, and a bounded buffer done right.
Java thread states, each one demonstrated: what puts a thread in BLOCKED vs WAITING, why RUNNABLE can mean idle in a socket read, and how to read it in jstack.
A Java Semaphore is a counter with a wait queue, not a lock. Why release() can mint permits, how leaks starve a pool, and how to cap virtual threads safely.
A race condition in Java can survive a ConcurrentHashMap and synchronized on every call. Check-then-act, critical sections, and how to prove the bug is there.
Thread join in Java waits on the Thread's own monitor, can't tell a timeout from success, and ignores failure. What join() promises, and what it hides.