L
Lau Lei Cheong
Hello,
I really need to use volatile System.Int64 for a .NET v1.1 program
in C#. But the compiler complains "a volatile field can not be of type
long". How to work around it? Or is there any other way to get similar
effect for Int64 type?
Another question less urging question is, why long variables can't
be used as volatile? I understand that in 32-bit arch. 64-bit operations are
not atomic, but seems that there could be locks or so applied, and for most
programmers they won't care as long as it works. (Hence would change it from
error to warning that the "volatile" is not so "volatile")
Thanks for any inputs.
Regards,
Lau Lei Cheong
I really need to use volatile System.Int64 for a .NET v1.1 program
in C#. But the compiler complains "a volatile field can not be of type
long". How to work around it? Or is there any other way to get similar
effect for Int64 type?
Another question less urging question is, why long variables can't
be used as volatile? I understand that in 32-bit arch. 64-bit operations are
not atomic, but seems that there could be locks or so applied, and for most
programmers they won't care as long as it works. (Hence would change it from
error to warning that the "volatile" is not so "volatile")
Thanks for any inputs.
Regards,
Lau Lei Cheong