Java synchronized mechanism

From NovaOrdis Knowledge Base
Revision as of 18:49, 22 March 2018 by Ovidiu (talk | contribs) (→‎Inefficiencies)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.