Java synchronized mechanism: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 9: Line 9:
=Inefficiencies=
=Inefficiencies=


Code written using the <tt>syncrhonized</tt> mechanism is expensive on multicore CPU systems.
Code written using the <tt>syncrhonized</tt> mechanism is expensive on multicore CPU systems. The [[Java_8_Streams_API|Streams API]], introduced in Java 8, avoids the need of explicitly using  <tt>syncrhonized</tt>.

Revision as of 04:52, 21 March 2018

Internal

Overview

Inefficiencies

Code written using the syncrhonized mechanism is expensive on multicore CPU systems. The Streams API, introduced in Java 8, avoids the need of explicitly using syncrhonized.