4. Using volatile keyword/basic thread synchronization.