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 sbt
Recipients jnoller, pitrou, sbt
Date 2011-06-14.22:40:25
SpamBayes Score 7.369581e-07
Marked as misclassified No
Message-id <1308091227.33.0.329224594915.issue12328@psf.upfronthosting.co.za>
In-reply-to
Content
> Also, what is the rationale for the following change:
> 
> -            elif timeout == 0.0:
> +            elif timeout == 0.0 and nleft != 0:
>                  return False

If PeekNamedPipe() returns (navail, nleft) there are 3 cases:

1) navail > 0: just return True
2) navail = nleft = 0: either pipe is empty or next message is empty
   so fall through to slow path to find out which.
3) navail = 0, nleft > 0: a non-empty message is coming, but nothing 
   is available yet.

The check is a shortcut for case 3, although it probably never 
occurs.  I've removed that check in the new patch, and added the 
unit tests to test_multiprocessing.

> There is infrastructure in _multiprocessing to handle Ctrl-C. Look 
> for "sigint_event" in Modules/_multiprocessing/*. This could be 
> the topic of a separate issue and patch.

I will look in to it.
History
Date User Action Args
2011-06-14 22:40:27sbtsetrecipients: + sbt, pitrou, jnoller
2011-06-14 22:40:27sbtsetmessageid: <1308091227.33.0.329224594915.issue12328@psf.upfronthosting.co.za>
2011-06-14 22:40:26sbtlinkissue12328 messages
2011-06-14 22:40:26sbtcreate