peakzhang 发表于 2007-12-19 22:02:36

于ACE_Message_Queue类的pulse()方法

ACE_Message_Queue类的pulse()方法不是很明白……
首先,什么叫做“迁移到到此状态(pulse状态)会使等待中的入队和出队操作立刻返回,想DEACTVATED一样;但所有PULSE状态中发起的操作和行为和在ACTIVATED状态中发起一样”?
然后就是pulse这个方法,到底有啥用处??

peakzhang 发表于 2007-12-19 22:02:41

找到一点,希望对楼主有用:

Douglas C. Schmidt added a new pulse() method. When called, the queue changes to the new PULSED state and any threads blocked on enqueue or dequeue operations to return immediately as if the queue had been deactivated. However, all operations initiated in the PULSED state behave as if the queue were in the ACTIVE state. See C++NPv2 chapter 6 for a description and example of this new facility
页: [1]
查看完整版本: 于ACE_Message_Queue类的pulse()方法