EpollSelectDispatcher.eventLoop

While there are clients registered, repeatedly waits for registered events to happen, invokes the corresponding event handlers of the registered clients and unregisters the clients if they desire so.

class EpollSelectDispatcher
void
eventLoop
(
scope bool delegate
()
select_cycle_hook = null
,
scope bool delegate
(
Exception
)
unhandled_exception_hook = null
)

Parameters

select_cycle_hook bool delegate
()

if not null, will be called each time select cycle finished before waiting for more events. Also called once before the first select. If returns true, epoll will return immediately if there are no active events.

unhandled_exception_hook bool delegate
(
Exception
)

if not null, will be called each time select cycle results in unhandled exception. May either rethrow or consume (ignore) exception instance after processing it.

Meta