'Poll the kqueue for new events.'

def doKEvent(self, timeout):

    if (timeout is None):
        timeout = 1
    try:
        events = self._kq.control([], len(self._selectables), timeout)
    except OSError as e:
        if (e.errno == errno.EINTR):
            return
        else:
            raise
    _drdw = self._doWriteOrRead
    for event in events:
        fd = event.ident
        try:
            selectable = self._selectables[fd]
        except KeyError:
            continue
        else:
            log.callWithLogger(selectable, _drdw, selectable, fd, event)
