event/Loop: remove bogus "!quit" assertion
Commit 1f11959
allowed modifying the "quit" attribute from any thread,
and thus the assertion may fail spuriously. This assertion is too
strict for the relaxed use of "quit". Let's remove it and move the
"quit" check to before the SockedMonitor::Dispatch() call.
This commit is contained in:
@ -165,17 +165,15 @@ EventLoop::Run()
|
||||
|
||||
now_ms = ::MonotonicClockMS();
|
||||
|
||||
assert(!quit);
|
||||
|
||||
/* invoke sockets */
|
||||
for (int i = 0; i < poll_result.GetSize(); ++i) {
|
||||
auto events = poll_result.GetEvents(i);
|
||||
if (events != 0) {
|
||||
auto m = (SocketMonitor *)poll_result.GetObject(i);
|
||||
m->Dispatch(events);
|
||||
|
||||
if (quit)
|
||||
break;
|
||||
|
||||
auto m = (SocketMonitor *)poll_result.GetObject(i);
|
||||
m->Dispatch(events);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user