Do I need MemoryBarrier with ReaderWriterLockSlim?

Viewed 381

It looks like the mono implementation has no MemoryBarrier calls inside the ReaderWriterLockSlim methods. So when I make any changes inside a write lock, I can receive old cached values in another thread which uses a read lock.

Is it really possible? Should I insert MemoryBarrier before and after the code inside Read and Write lock?

2 Answers
Related