{
int fd = sn->getFD();
ASSERT(notifiers.find(fd) == notifiers.end());
- notifiers[fd]=sn;
+ ASSERT(new_notifiers.find(fd) == new_notifiers.end());
+ new_notifiers[fd]=sn;
}
void eMainloop::removeSocketNotifier(eSocketNotifier *sn)
++i)
if (i->second == sn)
return notifiers.erase(i);
+ for (std::map<int,eSocketNotifier*>::iterator i = new_notifiers.find(sn->getFD());
+ i != new_notifiers.end();
+ ++i)
+ if (i->second == sn)
+ return new_notifiers.erase(i);
eFatal("removed socket notifier which is not present");
}
poll_timeout = user_timeout;
return_reason = 1;
}
-
+
+ for (std::map<int, eSocketNotifier*>::iterator it(new_notifiers.begin()); it != new_notifiers.end();)
+ {
+ notifiers[it->first]=it->second;
+ new_notifiers.erase(it++);
+ }
+
int nativecount=notifiers.size(),
fdcount=nativecount,
ret=0;
{
friend class eTimer;
friend class eSocketNotifier;
- std::map<int, eSocketNotifier*> notifiers;
+ std::map<int, eSocketNotifier*> notifiers, new_notifiers;
ePtrList<eTimer> m_timer_list;
bool app_quit_now;
int loop_level;