event/Loop: add assertions
This commit is contained in:
parent
e3270dfd68
commit
8bab5733d7
@ -118,6 +118,7 @@ EventLoop::AddFD(int fd, unsigned events, SocketEvent &event) noexcept
|
|||||||
#ifdef HAVE_THREADED_EVENT_LOOP
|
#ifdef HAVE_THREADED_EVENT_LOOP
|
||||||
assert(!IsAlive() || IsInside());
|
assert(!IsAlive() || IsInside());
|
||||||
#endif
|
#endif
|
||||||
|
assert(events != 0);
|
||||||
|
|
||||||
if (!poll_group.Add(fd, events, &event))
|
if (!poll_group.Add(fd, events, &event))
|
||||||
return false;
|
return false;
|
||||||
@ -132,6 +133,7 @@ EventLoop::ModifyFD(int fd, unsigned events, SocketEvent &event) noexcept
|
|||||||
#ifdef HAVE_THREADED_EVENT_LOOP
|
#ifdef HAVE_THREADED_EVENT_LOOP
|
||||||
assert(!IsAlive() || IsInside());
|
assert(!IsAlive() || IsInside());
|
||||||
#endif
|
#endif
|
||||||
|
assert(events != 0);
|
||||||
|
|
||||||
return poll_group.Modify(fd, events, &event);
|
return poll_group.Modify(fd, events, &event);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user