If on one thread I would be writing to a primitive-type variable, such as int, and the other would be reading it, would there be a possibility of reading partially modified data, as with more complex data types?
If yes, then would my only rescue be either atomic or mutex or is there a solution with less performance overhead?