Table of Contents

Java Concurrency - Synchronization (Thread Safety)

About

Concurrency - Synchronization in java.

Java offers two basic synchronization idioms:

The Java programming language neither prevents nor requires detection of deadlock conditions.

Idioms

To create synchronized code (ie which gives consistent values) between threads, you use the synchronized word..

Method

Statement

Implementation

Synchronization is implemented by an internal entity known as the monitor (intrinsic lock or monitor lock).

Documentation / Reference