def __init__(self, _kqueueImpl=select):
"""
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.
"""
self._impl = _kqueueImpl
self._kq = self._impl.kqueue()
self._reads = set()
self._writes = set()
self._selectables = {}
posixbase.PosixReactorBase.__init__(self)
评论列表
文章目录