event/Loop: reorder methods

This commit is contained in:
Max Kellermann 2020-12-01 20:09:24 +01:00
parent ef8797821f
commit ff8b5bc61b

View File

@ -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
{