malaikuangren

What is the purpose or drive to build thing like (xxx),How can it achieve the original goal of design?

2012年6月4日

Thread-Safety Read Write Lock(Synchronization of .net)

摘要: Quite often, instances of a type are thread-safe for concurrent read operations, but not for concurrent updates (nor for a concurrent read and update). This can also be true with resources such as a file. Although protecting instances of such types with a simpleexclusive lockfor all modes of access 阅读全文

posted @ 2012-06-04 18:59 malaikuangren 阅读(576) 评论(0) 推荐(0)
Barrier Class Usage(Synchronization of .net 4.0)

摘要: TheBarrierclass is a signaling construct new to Framework 4.0. It implements athread execution barrier, which allows many threads to rendezvous at a point in time. The class is very fast and efficient, and is built uponWait, Pulse, and spinlocks.To use this class:Instantiate it, specifying how many 阅读全文

posted @ 2012-06-04 15:15 malaikuangren 阅读(364) 评论(0) 推荐(0)
Main purposes of C# Volatile fields

摘要: IntroductionThe article describes the internals of volatile fields. I've seen a lot of discussions in the web regarding volatile fields. I've performed my own small research in this area, and here are some thoughts on this.Volatile fields and memory barrier: A look insideThe two main purpose 阅读全文

posted @ 2012-06-04 00:05 malaikuangren 阅读(533) 评论(0) 推荐(0)