[issue6056] socket.setdefaulttimeout affecting multiprocessing Manager

Derek Wilson report at bugs.python.org
Tue Jul 24 15:49:23 CEST 2012


Derek Wilson <jderekwilson at gmail.com> added the comment:

Thanks, Jim, here is an updated patch. 

1) I feel like it is clearly not-a-feature. Currently 2.7 crashes if remote managers are used and socket.setdefaulttimeout is anything other than None. Crashing seems bad and all this does is keep multiprocessing connection sockets non-blocking even if a default timeout is specified (so it maintains current behavior rather than crashing).

2) This problem is still evident on 2.7, 3.2 and 3.3 beta 1. This patch is against the current dev tip as of a few days ago.

3) here it is!

4) I agree that setblocking is more clear. I made the change.

My test modifications cover the entire suite twice, once without a default timeout and once with. This may be excessive? I'm not sure where non-blocking sockets might pop up as an issue since there is C code that relies on blocking sockets and I haven't dug that deep.

----------
Added file: http://bugs.python.org/file26497/mp6056fix.patch

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


More information about the Python-bugs-list mailing list