Chewy Interview Question

How does volatile works in conjuction with thread safety.