Java synchronized mechanism

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Overview

Inefficiencies

Code written using the syncrhonized mechanism is expensive on multicore CPU systems, because synchronization forces code to execute sequentially, which works against the goal of parallelism. The Streams API, introduced in Java 8, removes the need of explicitly using syncrhonized.