qpcpp/doxygen/snippets/qf_run.cpp
Quantum Leaps 890c8e7d8c 5.1.1
2013-10-10 20:01:51 -04:00

12 lines
421 B
C++

void QActive::run(void) {
do {
QEvt const *e;
QACTIVE_GET_(this, e); // wait for an event
dispatch(e); // dispatch event to the active object's state machine
QF::gc(e); // check if the event is garbage, and collect it if so
} while (m_running);
unsubscribeAll(); // unsubscribe from all signals
QF::remove_(this); // remove this object from any subscriptions
}