event/Loop: move the poll_backend to the top

This is where all sockets are registered, so it should be initialized
first and destructed last.
This commit is contained in:
Max Kellermann 2023-09-16 22:45:23 +02:00
parent f086444e4a
commit 41b1931d91

View File

@ -44,6 +44,8 @@ class InjectEvent;
*/
class EventLoop final
{
EventPollBackend poll_backend;
#ifdef HAVE_THREADED_EVENT_LOOP
WakeFD wake_fd;
SocketEvent wake_event{*this, BIND_THIS_METHOD(OnSocketReady), wake_fd.GetSocket()};
@ -128,8 +130,6 @@ class EventLoop final
bool uring_initialized = false;
#endif
EventPollBackend poll_backend;
ClockCache<std::chrono::steady_clock> steady_clock_cache;
public: