![]() |
Home · Modules · Classes · Namespaces · Functions |
The QxtMultiSignalWaiter class blocks and processes events until a group of signals is emitted More...
#include <QxtMultiSignalWaiter>
Inherits QxtSignalGroup.
The QxtMultiSignalWaiter class blocks and processes events until a group of signals is emitted
Code written in a synchronous style will sometimes need to block until any of several conditions are met, or until all of a set of conditions are met. This class allows a group of signals to be defined and waited upon in a simple AND or OR fashion. More complex Boolean relationships can be written by connecting together multiple QxtSignalGroup objects and waiting for all or any of these groups to emit one of their signals.
Note: QxtMultiSignalWaiter is subject to the same reentrancy problems as QxtSignalWaiter.
See also QxtSignalWaiter.
Constructs a QxtMultiSignalWaiter with the specified parent.
Destructs the multi signal waiter.
Blocks the current function by processing events from the event queue according to flags until all of the signals in the group have been emitted. If msec is not -1, waitForAll() will return before all of the signals are emitted if the specified number of milliseconds have elapsed. Returns true if each signal was caught at least once, or false if the timeout elapsed. Note that waitForAll() may continue to block after the last signal is emitted or the timeout elapses; the function only guarantees that it will not return BEFORE one of these conditions has occurred. This function is not reentrant.
See also QxtSignalGroup::addSignal() and QxtSignalGroup::allSignalsReceived().
Blocks the current function by processing events from the event queue according to flags until any of the signals in the group are emitted. If msec is not -1, waitForAny() will return before a signal is emitted if the specified number of milliseconds have elapsed. Returns true if a signal was caught, or false if the timeout elapsed. Note that waitForAny() may continue to block after a signal is emitted or the timeout elapses; the function only guarantees that it will not return BEFORE one of these conditions has occurred. This function is not reentrant.
See also QxtSignalGroup::addSignal() and QxtSignalGroup::firstSignalReceived().
Copyright © 2007-2010 Qxt Foundation |
Qxt 0.6.1 |