Answer
The volatile keyword tells the compiler that a variable may be modified by multiple threads.
It prevents certain optimizations and ensures every read returns the most recent value.
The volatile keyword tells the compiler that a variable may be modified by multiple threads.
It prevents certain optimizations and ensures every read returns the most recent value.
Sign in to access all features and personalize your learning experience.
Source: SugharaIQ