Thread-Safety, Concurrency Policy and Immutability

#52 - Software Qualities for Quality Software - Marco Faella

Topic 10 of 12

Published Aug 23, 2021 · Clip 41:20–46:31 (5:11)

Marco advises establishing a clear concurrency policy before adding synchronization: decide which operations can run in parallel without synchronization and which must be serialized. When possible, avoid the problem entirely by using higher-level concurrency primitives like Java's thread-safe collections and parallel streams. He endorses immutability as a powerful tool against race conditions, noting performance costs, and recommends it for highly concurrent or safety-critical applications.