[C#多线程编程(四)]高级线程编程

原文:http://www.albahari.com/threading/part4.aspx

PART 4: ADVANCED THREADING

非阻塞同步

Earlier, we said that the need for synchronization arises even in the simple case of assigning or incrementing a field. Although locking can always satisfy this need, a contended lock means that a thread must block, suffering the overhead of a context switch and the latency of being descheduled, which can be undesirable in highly concurrent and performance-critical scenarios. The .NET Framework’s nonblocking synchronization constructs can perform simple operations without ever blocking, pausing, or waiting.

 

(占位)

posted @ 2012-06-30 14:28  xcf007  阅读(194)  评论(0编辑  收藏  举报