synchronized and Locks: Making Operations Atomic Again
The synchronized keyword and the Lock interface are Java's most direct answer to the race conditions and non-atomic operations covered in …
The synchronized keyword and the Lock interface are Java's most direct answer to the race conditions and non-atomic operations covered in …
volatile fixes the visibility hang from the previous phase in one word, but it is one of the most misunderstood keywords in Java because …
AtomicInteger and its relatives fix the same lost-update problem as synchronized, without ever blocking a thread, by building on a single …
Every new Thread() has a real memory and context-switching cost, as the first phase of this series covered. ExecutorService bounds and …
Plain HashMap and ArrayList are not just slower under concurrent mutation, they are unsafe. The java.util.concurrent collections were …
BlockingQueue lets producer threads and consumer threads hand off work through a queue that blocks instead of failing when it is empty or …
Not every coordination problem is about protecting shared state. Sometimes threads just need to wait for each other at the right moments, …