'Initialize kqueue object, file descriptor tracking dictionaries, and
the base class.
See:
- http://docs.python.org/library/select.html
- www.freebsd.org/cgi/man.cgi?query=kqueue
- people.freebsd.org/~jlemon/papers/kqueue.pdf
@param _kqueueImpl: The implementation of L{_IKQueue} to use. A
hook for testing.'

def __init__(self, _kqueueImpl=select):

    self._impl = _kqueueImpl
    self._kq = self._impl.kqueue()
    self._reads = set()
    self._writes = set()
    self._selectables = {}
    posixbase.PosixReactorBase.__init__(self)
