event/Loop: simplify wake_event initializer
This commit is contained in:
parent
51f110a990
commit
13f8a912e3
@ -56,9 +56,6 @@ EventLoop::EventLoop(
|
|||||||
alive(!_thread.IsNull())
|
alive(!_thread.IsNull())
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef HAVE_THREADED_EVENT_LOOP
|
|
||||||
wake_event.Open(wake_fd.GetSocket());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EventLoop::~EventLoop() noexcept
|
EventLoop::~EventLoop() noexcept
|
||||||
|
@ -63,7 +63,7 @@ class EventLoop final
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_THREADED_EVENT_LOOP
|
#ifdef HAVE_THREADED_EVENT_LOOP
|
||||||
WakeFD wake_fd;
|
WakeFD wake_fd;
|
||||||
SocketEvent wake_event{*this, BIND_THIS_METHOD(OnSocketReady)};
|
SocketEvent wake_event{*this, BIND_THIS_METHOD(OnSocketReady), wake_fd.GetSocket()};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct TimerCompare {
|
struct TimerCompare {
|
||||||
|
Loading…
Reference in New Issue
Block a user