- eMainloop():app_quit_now(0),loop_level(0),retval(0){ }
- void addSocketNotifier(eSocketNotifier *sn);
- void removeSocketNotifier(eSocketNotifier *sn);
- void addTimer(eTimer* e) { TimerList.insert_in_order(e); }
- void removeTimer(eTimer* e) { TimerList.remove(e); }
-
+ static ePtrList<eMainloop> existing_loops;
+ eMainloop()
+ :app_quit_now(0),loop_level(0),retval(0),timer_offset(0)
+ {
+ existing_loops.push_back(this);
+ pthread_mutex_init(&recalcLock, 0);
+ }
+ ~eMainloop()
+ {
+ existing_loops.remove(this);
+ pthread_mutex_destroy(&recalcLock);
+ }