... continued
Continues the discussion on the volatile concept.
We'll cover the following...
We'll cover the following...
Before we end the discussion on volatile, let's discuss some more examples often quoted to demonstrate the difficulty of correctly reasoning and applying the volatile keyword.
Consider the following example:
We have two volatile fields and two ordinary fields. The first thread executes the following two instructions:
The first is a ...