Archive Post

Immutability 2 – Concurrency: Part II

All reads and writes are atomic actions for all volatile fields, regardless of whether they…

Atomic Variables 2 – Concurrency: Part II

The while loop ensures that the value is always incremented by 1 from the previous…

Atomic Variables – Concurrency: Part II

Atomic Variables Unless the action on a shared volatile variable is atomic, thread-safety cannot be…

Immutability – Concurrency: Part II

Immutability We have seen how to implement thread-safe access to shared resources in synchronized code…