Currently, need_epoll_updates flag is polled at the start of each spin loop iteration. If the executor is blocked in epoll_wait(), new registrations are not detected until the timeout expires.
It is better to use an eventfd monitored by epoll. Write to it when registering new callbacks/timers to wake up epoll_wait() immediately.