> It would only be available on the Linux platform, and one of the benefits would be the ability to create synchronisation primitives on said platform that can block on normal threads, and be awaited on in coroutines (without busy looping inside said coroutine).
+1. Although it already exists as a package on PyPI, I've seen a non-negligible amount of user demand for a synchronization primitive that works as described above for asyncio. Adding eventfd() to the stdlib seems like a step towards eventually implementing something like that in an effective manner, and I don't think the maintenance burden would be especially high. I could also see a significant potential use case for multiprocessing (CC'd Antoine in case he has anything to add there). > Currently the best place I can think of to put it would be in one of the Networking and Interprocess Communication modules (possibly `select` or `socket`?). The select module seems like it would be a reasonable location. On Tue, Jun 16, 2020 at 8:42 AM <[email protected]> wrote: > Can we implement eventfd(2) as documented here < > https://man7.org/linux/man-pages/man2/eventfd.2.html>? > > It would only be available on the Linux platform, and one of the benefits > would be the ability to create synchronisation primitives on said platform > that can block on normal threads, and be awaited on in coroutines (without > busy looping inside said coroutine). > > Currently the best place I can think of to put it would be in one of the > Networking and Interprocess Communication modules (possibly `select` or > `socket`?). The fact that it's Linux only shouldn't be an issue, since much > of the contents of `select` is OS dependent. > _______________________________________________ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/2BX6V4NB24QFXAPXAYQVKGG72SKAF3YF/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/NEPEG5UQ2ZRQNODQM6NKXW77E7XWOYZI/ Code of Conduct: http://python.org/psf/codeofconduct/
