摘要:
Guarded Blocks保护块Threads often have to coordinate their actions. The most common coordination idiom is the guarded block. Such a block begins by polling a condition that must be true before the block can proceed. There are a number of steps to follow in order to do this correctly.线程经常必须协调他们的活动。最普通的协 阅读全文
摘要:
Deadlock 死锁Deadlock describes a situation where two or more threads are blocked forever, waiting for each other. Here's an example.死锁就是俩个或多个线程互相等待造成永远被阻塞的状况。这里有一个例子Alphonse and Gaston are friends, and great believers in courtesy. A strict rule of courtesy is that when you bow to a friend, you mu 阅读全文