File: //proc/self/root/lib/python3/dist-packages/twisted/internet/__pycache__/epollreactor.cpython-38.pyc
U
W[-! � @ s� d Z ddlmZmZ ddlmZmZmZmZm Z ddl
Z
ddlmZ ddl
mZ ddlmZ ddlmZ ee�G d d
� d
ejej��Zdd� Zd
dgZdS )
z�
An epoll() based implementation of the twisted main loop.
To install the event loop (and you should do this before any connections,
listeners or connectors are added)::
from twisted.internet import epollreactor
epollreactor.install()
� )�division�absolute_import)�epoll�EPOLLHUP�EPOLLERR�EPOLLIN�EPOLLOUTN)�implementer)�
IReactorFDSet)�log)� posixbasec @ s| e Zd ZdZeeB ZeZe Z
dd� Zdd� Zdd� Z
dd � Zd
d� Zdd
� Zdd� Zdd� Zdd� Zdd� Zdd� ZeZdS )�EPollReactora�
A reactor that uses epoll(7).
@ivar _poller: A C{epoll} which will be used to check for I/O
readiness.
@ivar _selectables: A dictionary mapping integer file descriptors to
instances of C{FileDescriptor} which have been registered with the
reactor. All C{FileDescriptors} which are currently receiving read or
write readiness notifications will be present as values in this
dictionary.
@ivar _reads: A set containing integer file descriptors. Values in this
set will be registered with C{_poller} for read readiness notifications
which will be dispatched to the corresponding C{FileDescriptor}
instances in C{_selectables}.
@ivar _writes: A set containing integer file descriptors. Values in this
set will be registered with C{_poller} for write readiness
notifications which will be dispatched to the corresponding
C{FileDescriptor} instances in C{_selectables}.
@ivar _continuousPolling: A L{_ContinuousPolling} instance, used to handle
file descriptors (e.g. filesystem files) that are not supported by
C{epoll(7)}.
c C s<