From ff8b5bc61b3df9671333e7b2a45d60246d93040d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 1 Dec 2020 20:09:24 +0100 Subject: [PATCH] event/Loop: reorder methods --- src/event/Loop.cxx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) 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 {