By tag: lock
Ban this user: Options
Please provide a reason for deleting this story
An article about atomic transactions and how to maintain them using locks in C#
That part I knew… what we news to me is there is a better way to do volatile, and that is with an explicitly memory barrier before accessing the data member.. We have a an API for that: System.Threading.Thread.MemoryBarrier(). This is more efficient than using volatile because a volatile field r...