event/Loop: simplify wake_event initializer

This commit is contained in:
Max Kellermann 2021-01-11 20:14:18 +01:00
parent 51f110a990
commit 13f8a912e3
2 changed files with 1 additions and 4 deletions

View File

@ -56,9 +56,6 @@ EventLoop::EventLoop(
alive(!_thread.IsNull())
#endif
{
#ifdef HAVE_THREADED_EVENT_LOOP
wake_event.Open(wake_fd.GetSocket());
#endif
}
EventLoop::~EventLoop() noexcept

View File

@ -63,7 +63,7 @@ class EventLoop final
{
#ifdef HAVE_THREADED_EVENT_LOOP
WakeFD wake_fd;
SocketEvent wake_event{*this, BIND_THIS_METHOD(OnSocketReady)};
SocketEvent wake_event{*this, BIND_THIS_METHOD(OnSocketReady), wake_fd.GetSocket()};
#endif
struct TimerCompare {