diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx index bdc526c2c..e59d6dfa9 100644 --- a/src/event/Loop.cxx +++ b/src/event/Loop.cxx @@ -104,19 +104,6 @@ EventLoop::Break() noexcept #endif } -bool -EventLoop::AbandonFD(SocketEvent &event) noexcept -{ -#ifdef HAVE_THREADED_EVENT_LOOP - assert(!IsAlive() || IsInside()); -#endif - assert(event.IsDefined()); - - event.unlink(); - - return poll_backend.Abandon(event.GetSocket().Get()); -} - bool EventLoop::AddFD(int fd, unsigned events, SocketEvent &event) noexcept { @@ -154,6 +141,19 @@ EventLoop::RemoveFD(int fd, SocketEvent &event) noexcept return poll_backend.Remove(fd); } +bool +EventLoop::AbandonFD(SocketEvent &event) noexcept +{ +#ifdef HAVE_THREADED_EVENT_LOOP + assert(!IsAlive() || IsInside()); +#endif + assert(event.IsDefined()); + + event.unlink(); + + return poll_backend.Abandon(event.GetSocket().Get()); +} + void EventLoop::AddTimer(TimerEvent &t, Event::Duration d) noexcept {