[issue22018] Add a new signal.set_wakeup_socket() function

Charles-François Natali report at bugs.python.org
Thu Jul 24 20:55:17 CEST 2014


Charles-François Natali added the comment:

As I said offline to Victor, I think it would be better to have a single function, i.e. keep set_wakeup_fd(). It makes the API simpler, less confusing and error prone: some people will wonder which one they should use, might end up using the wrong one, or both.
Furthermore, it makes writing portable Python code more difficult, since the user has to chose the right function.
If set_wakeup_fd() can do an fstat() (or whatever that it on Windows) to detect the FD type and call send() instead of write() on a socket, all the above issues would go away.
"Never let the user do what the library can do for him".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22018>
_______________________________________


More information about the Python-bugs-list mailing list