随笔-43  评论-206  文章-0  trackbacks-11

MultiThreading & Synchronization

Because of project, I read some materials about multithreading and synchronization.
The following list describes some of the methods implement thread-safe code.

1. lock
    C# keyword.     It can be used as an alternative to the methods of the Monitor class.

2.Monitor
    Monitors object are used to lock the critical sections of code so that one and only one thread can 
has access to those critical sections at any point of time.

3. Mutex
   Similar to Monitor, it is used to ensure that only one thread can access resource that shared across process mostly.

4. SynchronizationAttribute
  ensure that only one thread at a time can access an object.

5. MethodImplAttribute
  notified the complier on how the method should be implemented.

I will give example and discuss the difference between these methods later.


-------------------------------------------------------------------------------------------
此文有特殊的目的:练习英语写作

posted on 2007-01-31 21:07 tablefor2 阅读(185) 评论(0) 编辑 收藏

搜索

 

随笔分类

Links

评论排行榜