[issue34535] queue.Queue(timeout=0.001) avg delay Windows:14.5ms, Ubuntu: 0.063ms

Steve Dower report at bugs.python.org
Thu Aug 30 13:51:25 EDT 2018


Steve Dower <steve.dower at python.org> added the comment:

Agreed with not putting platform-specific details everywhere, but in this case we can probably have a generic wording for "Blocks for `timeout` seconds as best as is available on the current operating system".

It is a general problem across all timeouts, so someone probably ought to do a full pass to find anywhere it matters. I'm not volunteering for that though!

About the only other possible fix is to figure out the current resolution, and replace any waits with shorter timeouts with a spin-lock. But in general I would rather leave this to the operating system and just document that we can't always overrule decisions made by the OS.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34535>
_______________________________________


More information about the Python-bugs-list mailing list