[issue40485] Provide an abstraction for a select-able Event

Faidon Liambotis report at bugs.python.org
Fri Apr 9 12:33:53 EDT 2021


Faidon Liambotis <paravoid at debian.org> added the comment:

I missed that there is now also an os.eventfd_{write,read}(), so in the above
    os.write(self._event_fd, self._ONE)
can become
    os.eventfd_write(self._event_fd, 1)

and:
    os.read(self._event_fd, 8)
can become:
    os.eventfd_read(self._event_fd)

(the _ONE declaration will then be unnecessary and can be removed)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40485>
_______________________________________


More information about the Python-bugs-list mailing list