What happens when a thread updates a `volatile` variable?
When a thread updates a `volatile` variable, it is cached in the local threadâ€™s memory and may not be visible to other threads until the thread exits.
Thatâ€™s incorrect. `volatile` variables are not cached locally by threads, and changes are immediately visible to other threads.
Can you explain what could happen with a normal non-volatile variable in a multi-threaded context?