C C# Learner Oct 19, 2004 #1 Is a float [C#] which is declared as volatile [C#] guaranteed to be read from and written to atomically?
Is a float [C#] which is declared as volatile [C#] guaranteed to be read from and written to atomically?
J Jon Skeet [C# MVP] Oct 19, 2004 #2 C# Learner said: Is a float [C#] which is declared as volatile [C#] guaranteed to be read from and written to atomically? Click to expand... It's guaranteed to be read from and written to atomically whether or not it's declared volatile.
C# Learner said: Is a float [C#] which is declared as volatile [C#] guaranteed to be read from and written to atomically? Click to expand... It's guaranteed to be read from and written to atomically whether or not it's declared volatile.
C C# Learner Oct 19, 2004 #3 It's guaranteed to be read from and written to atomically whether or not it's declared volatile. Click to expand... Thanks
It's guaranteed to be read from and written to atomically whether or not it's declared volatile. Click to expand... Thanks
S Sriram Krishnan Oct 20, 2004 #4 Hmm..then the only purpose is to set up automatic memory barriers when you have a volatile variable? And just curious - what's the VB.NET equivalent of 'volatile'?
Hmm..then the only purpose is to set up automatic memory barriers when you have a volatile variable? And just curious - what's the VB.NET equivalent of 'volatile'?
J Jon Skeet [C# MVP] Oct 20, 2004 #5 Sriram Krishnan said: Hmm..then the only purpose is to set up automatic memory barriers when you have a volatile variable? Yes. And just curious - what's the VB.NET equivalent of 'volatile'? Click to expand... I don't think there is one.
Sriram Krishnan said: Hmm..then the only purpose is to set up automatic memory barriers when you have a volatile variable? Yes. And just curious - what's the VB.NET equivalent of 'volatile'? Click to expand... I don't think there is one.