Which managed memory model?

In this article, Vance Morrison describes some of the issues involved in writing managed multithreaded code that avoids the use of locks.  In particular, he discusses the impact of memory models on lock-free (or low-lock) programming. For managed code running on the CLR, there are two models that matter: The ECMA CLI memory model The…

1

What synchronization primitives would you like to have in the .NET Framework?

The .NET framework currently offers several synchronization primitives: Monitors (via the Monitor class.  C# users know this as the “lock” statement) Two varieties of reader/writer lock (ReaderWriterLock / ReaderWriterLockSlim) Events (ManualResetEvent/AutoResetEvent) Mutexes (for inter-process locking) Semaphores Static constructors (which synchronize initialization of a class) We also provide some basic building blocks for rolling your own…

0