Message224264
I commited my patch to support sockets in signal.set_wakeup_fd() on Windows.
I updated my patch. It doesn't change signal.set_wakeup_fd() on Windows anymore. It only raises an exception on POSIX if the file descriptor is blocking.
On Windows, it's not possible to make a file non-blocking and so the signal handler may block on writing in the file. Antoine Pitrou doesn't want to change the behaviour, he prefers to still support files even if there is the possible hang.
On Windows, it's not possible to check if a socket handle is blocking or not. So set_wakeup_fd() doesn't check if the socket is blocking or not on Windows.
At least, the check can be implemented on POSIX.
--
An alternative is to make the file descriptor non-blocking in set_wakeup_fd(). In this case, I suggest to drop support of files on Windows because files cannot be set in non-blocking mode. |
|
Date |
User |
Action |
Args |
2014-07-29 22:22:45 | vstinner | set | recipients:
+ vstinner, pitrou, neologix, python-dev |
2014-07-29 22:22:45 | vstinner | set | messageid: <1406672565.3.0.104063734548.issue22042@psf.upfronthosting.co.za> |
2014-07-29 22:22:45 | vstinner | link | issue22042 messages |
2014-07-29 22:22:45 | vstinner | create | |
|