by Mark Shiffer
24. September 2007 22:31
I read a pretty good article in MSDN Magazine detailing 9 patterns from multi-threaded programming. There are a lot of details about MTA that elude many of today's programmers, and even .NET in all of its bliss has not completely hidden the complexities involved. The patterns described are: Countdown Latch, Reusable Spin Wait, Barriers, Blocking Queue, Bounded Buffer, Thin Event, Lock-Free LIFO Stack, Loop Tiling and Parallel Reductions. The article also goes into details about performance of the various alternative methods used in MTA, such as, Interlocked.Increment, Interlocked.Decrement, Interlocked.CompareExchange, Thread.SpinWait, EventWaitHandle.Set, EventWaitHandle.Reset, Monitor.Pulse, Monitor.Wait, Monitor.PulseAll, Thread.MemoryBarrier, ManualResetEvent.
The article can be found at: 9 Reusable Parallel Data Structures and Algorithms