Commit 7fc04fd5 authored by Max Kellermann's avatar Max Kellermann

event/SocketEvent: move Dispatch() down

parent 7901b04c
......@@ -29,16 +29,6 @@
#endif
void
SocketEvent::Dispatch() noexcept
{
const unsigned flags = std::exchange(ready_flags, 0) &
(GetScheduledFlags() | IMPLICIT_FLAGS);
if (flags != 0)
callback(flags);
}
void
SocketEvent::Open(SocketDescriptor _fd) noexcept
{
assert(!fd.IsDefined());
......@@ -99,3 +89,13 @@ SocketEvent::Schedule(unsigned flags) noexcept
return success;
}
void
SocketEvent::Dispatch() noexcept
{
const unsigned flags = std::exchange(ready_flags, 0) &
(GetScheduledFlags() | IMPLICIT_FLAGS);
if (flags != 0)
callback(flags);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment