This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients gvanrossum, loewis, neologix, pitrou, python-dev, vstinner, yselivanov
Date 2014-07-24.22:36:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406241379.06.0.943976828007.issue22018@psf.upfronthosting.co.za>
In-reply-to
Content
>> In fact, it works to write the signal number into a pipe on Windows, but I'm worried about the blocking behaviour.

> It wasn't different before, so I'm not sure why we should start to worry about it?

Does you have an idea if set_wakeup_fd() is used on Windows? It's not possible to use it with select.select() because on Windows this function only accepts sockets. I don't know if it's possible to watch a pipe using IOCP. Is set_wakeup_fd() used by Twisted, Tornado or another project on Windows?

I would like to modify signal.set_wakeup_fd() to make the file descriptor (or socket) non-blocking: see issue #22042. I proposed this change to protect the user against misuse of the API, and to make the API more convinient. asyncore and asyncio modules also make files and sockets non-blocking: asyncore.dispatcher(sock) and asyncio.BaseEventLoop.connect_read_pipe() for example.

Oh, by the way, sock_xxx() methods of asyncio.BaseEventLoop don't make the socket non-blocking, and the documentation doesn't require that sockets are already set to non-blocking mode. It looks like a bug (at least in the documentation).
History
Date User Action Args
2014-07-24 22:36:19vstinnersetrecipients: + vstinner, gvanrossum, loewis, pitrou, neologix, python-dev, yselivanov
2014-07-24 22:36:19vstinnersetmessageid: <1406241379.06.0.943976828007.issue22018@psf.upfronthosting.co.za>
2014-07-24 22:36:19vstinnerlinkissue22018 messages
2014-07-24 22:36:18vstinnercreate