I was having a debate with several high ranking programmers on SO about needing to mark an INT volatile or having to use Interlocked atomic writes to make sure the class variable gets flushed to memory after the method call finishes.
Indeed, there is no need for that. You need to sync only if something must get visible to another thread.
My argument is that unless the method discards the data or inlines the method call, the method has to eventually flush the data from registers back to memory before returning control.
As written, this statement seems indeed either insane or tautological. I am not surprised SO people were baffled.
A semaphore is a totally different thing than an ordinary user-defined class object.