How to use the select26.KQ_EV_ENABLE function in select26

To help you get started, we’ve selected a few select26 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apple / ccs-calendarserver / kqreactor.py View on Github external
def addReader(self, reader):
        """
        Add a FileDescriptor for notification of data available to read.
        """
        fd = reader.fileno()
        if fd not in self._reads:
            if fd not in self._selectables:
                self._updateRegistration(fd, KQ_FILTER_READ, KQ_EV_ADD|KQ_EV_ENABLE)
                self._updateRegistration(fd, KQ_FILTER_WRITE, KQ_EV_ADD|KQ_EV_DISABLE)
                self._selectables[fd] = reader
            else:
                self._updateRegistration(fd, KQ_FILTER_READ, KQ_EV_ENABLE)
            self._reads.add(fd)
github apple / ccs-calendarserver / kqreactor.py View on Github external
def addReader(self, reader):
        """
        Add a FileDescriptor for notification of data available to read.
        """
        fd = reader.fileno()
        if fd not in self._reads:
            if fd not in self._selectables:
                self._updateRegistration(fd, KQ_FILTER_READ, KQ_EV_ADD|KQ_EV_ENABLE)
                self._updateRegistration(fd, KQ_FILTER_WRITE, KQ_EV_ADD|KQ_EV_DISABLE)
                self._selectables[fd] = reader
            else:
                self._updateRegistration(fd, KQ_FILTER_READ, KQ_EV_ENABLE)
            self._reads.add(fd)
github apple / ccs-calendarserver / kqreactor.py View on Github external
def addWriter(self, writer):
        """
        Add a FileDescriptor for notification of data available to write.
        """
        fd = writer.fileno()
        if fd not in self._writes:
            if fd not in self._selectables:
                self._updateRegistration(fd, KQ_FILTER_WRITE, KQ_EV_ADD|KQ_EV_ENABLE)
                self._updateRegistration(fd, KQ_FILTER_READ, KQ_EV_ADD|KQ_EV_DISABLE)
                self._selectables[fd] = writer
            else:
                self._updateRegistration(fd, KQ_FILTER_WRITE, KQ_EV_ENABLE)
            self._writes.add(fd)

select26

Backport of the new select module with epoll and kqueue interface

MIT
Latest version published 17 years ago

Package Health Score

39 / 100
Full package analysis

Similar packages