(self, fd, callback)
Starts watching a non-blocking fd for data.
Starts watching a non-blocking fd for data.
Starts watching a non - blocking fd for data .
def add_watcher(self, fd, callback):
        """Starts watching a non-blocking fd for data."""

        if not isinstance(fd, int):
            fd = fd.fileno()

        self.callbacks[fd] = callback
        self.epoll.register(fd, EPOLLIN)
def add_watcher ( self , fd , callback ) : if not isinstance ( fd , int ) : fd = fd . fileno ( ) self . callbacks [ fd ] = callback self . epoll . register ( fd , EPOLLIN )