摘要
针对C#环境下线程安全的问题,介绍了3种最常用的保护临界区资源的方法,包括Sys-tem.Monitor类、Mutex类和C#的lock语句,对这3种方法进行了比较并概括了其特点,通过实例介绍了3种方法的运行效果。
This paper introduces the protection of critical section in multithreaded programming when using C# to develop applications,discusses thread synchronization with the System. Monitor and Mutex classes and the C# lock statement,and provides the eomparison of these methods.
出处
《河北工业科技》
CAS
2006年第2期102-103,123,共3页
Hebei Journal of Industrial Science and Technology
关键词
C#
多线程
进程
C#
multithread
process