function to test whether events are pending

sayer/1.4-spce2.6
Stefan Sayer 16 years ago
parent f300e8ec18
commit afbad3b310

@ -124,6 +124,13 @@ void AmEventQueue::processSingleEvent()
m_queue.unlock();
}
bool AmEventQueue::eventPending() {
m_queue.lock();
bool res = !ev_queue.empty();
m_queue.unlock();
return res;
}
void AmEventQueue::setEventNotificationSink(AmEventNotificationSink*
_wakeup_handler) {
// locking actually not necessary - if replacing pointer is atomic

@ -76,6 +76,7 @@ public:
void waitForEvent();
void wakeup();
void processSingleEvent();
bool eventPending();
void setEventNotificationSink(AmEventNotificationSink* _wakeup_handler);
};

Loading…
Cancel
Save