Run watchers even if a timer is firing constantly
Also make sure to drain the signalfd each time through.
There can only be so many outstanding signals on a system, and this
bounds that much better. It also handles events which take too long to
handle and other events are ready to be handled.
Change-Id: I24ea65356c7316818ce70f34a84174426b85d329
diff --git a/aos/events/shm_event_loop.h b/aos/events/shm_event_loop.h
index b76b4fe..845857c 100644
--- a/aos/events/shm_event_loop.h
+++ b/aos/events/shm_event_loop.h
@@ -8,6 +8,7 @@
#include "aos/events/epoll.h"
#include "aos/events/event_loop.h"
#include "aos/events/event_loop_generated.h"
+#include "aos/ipc_lib/signalfd.h"
DECLARE_string(application_name);
DECLARE_string(shm_base);
@@ -151,6 +152,9 @@
const Node *const node_;
internal::EPoll epoll_;
+
+ // Only set during Run().
+ std::unique_ptr<ipc_lib::SignalFd> signalfd_;
};
} // namespace aos