[issue31539] asyncio.sleep may sleep less time then it should

Antoine Pitrou report at bugs.python.org
Thu Sep 21 17:35:06 EDT 2017


Antoine Pitrou added the comment:

Le 21/09/2017 à 23:31, STINNER Victor a écrit :
> 
> Yury: asyncio can trigger events earlier than scheduled for performance
> reasons.

If that's true, then it sounds like a bug.  If there is a rationale for
a "fast and imprecise" API, then it would seem ok to add such an API.
But the default API for event scheduling should not take such shortcuts
IMHO.  Most users don't schedule thousands of events at a time, however
they expect timeouts to be observed as rigorously as is possible given
the usual implementation constraints such as GC pauses.

----------

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


More information about the Python-bugs-list mailing list