[Tutor] Bug? multiprocessing.JoinableQueue

Jordan wolfrage8765 at gmail.com
Tue Jul 16 12:24:58 CEST 2013


On 07/16/2013 03:35 AM, eryksun wrote:
> On Mon, Jul 15, 2013 at 11:21 PM, Jordan <wolfrage8765 at gmail.com> wrote:
>> The interactive session returns immediately, no pause or wait.
>> If I use timeout=1.01 then the interactive session pauses as expected, or
>> any number other than 1 for the matter.
> The bug you found is fixed in 3.3.2. Depending on the speed of your
> machine, even a timeout slightly larger than 1 (e.g. 1.000001) would
> trigger the rounding problem.
Thanks, guess I should had Googled harder, but I had not found it when I 
looked.  Also really good to know it was not just me or something I did.
>
> See issue 17707:
> http://bugs.python.org/issue17707
>
> The poll timeout in milliseconds was being calculated incorrectly:
>
>      # 3.3.1
>      timeout = int(timeout) * 1000  # timeout is in milliseconds
>
> http://hg.python.org/cpython/file/d9893d13c628/Lib/multiprocessing/connection.py#l865
>
>      # 3.3.2
>      timeout = int(timeout * 1000) # timeout is in milliseconds
>
> http://hg.python.org/cpython/file/d047928ae3f6/Lib/multiprocessing/connection.py#l865



More information about the Tutor mailing list