资 源 简 介
线程同步机制。
互斥器的功能和临界区域很相似。区别是:Mutex所花费的时间比Critical Section多的多,但是Mutex是核心对象(Event、Semaphore也是),可以跨进程使用,而且等待一个被锁住的Mutex可以设定TIMEOUT,不会像Critical Section那样无法得知临界区域的情况,而一直死等。-Thread synchronization mechanism. Mutex" s function and the critical region is very similar. The difference is: Mutex spent more time than the multi-Critical Section, but the Mutex is the core object (Event, Semaphore is), you can cross-process use, and has been locked waiting for a Mutex can be set to TIMEOUT, not as Critical Section did not know the critical situation in the region, for so long and so die.