make it possible for event queues to remove themselves during event broadcast (e.g. shutdown)

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1416 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 17 years ago
parent 22d7fcffc3
commit bcf540ff4b

@ -136,9 +136,12 @@ bool AmEventDispatcher::broadcast(AmEvent* ev)
bool posted = false;
m_queues.lock();
for (EvQueueMapIter it = queues.begin();
it != queues.end(); it++) {
EvQueueMapIter it = queues.begin();
while (it != queues.end()) {
it++;
m_queues.unlock();
it->second->postEvent(ev->clone());
m_queues.lock();
posted = true;
}

Loading…
Cancel
Save