于ACE_Message_Queue类的pulse()方法
ACE_Message_Queue类的pulse()方法不是很明白……首先,什么叫做“迁移到到此状态(pulse状态)会使等待中的入队和出队操作立刻返回,想DEACTVATED一样;但所有PULSE状态中发起的操作和行为和在ACTIVATED状态中发起一样”?
然后就是pulse这个方法,到底有啥用处?? 找到一点,希望对楼主有用:
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]