Author yselivanov
Recipients germn, gvanrossum, pitrou, r.david.murray, vstinner, yselivanov
Date 2017-09-21.21:41:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
So here's the relevant piece of code:

        end_time = self.time() + self._clock_resolution
        while self._scheduled:
            handle = self._scheduled[0]
            if handle._when >= end_time:
            handle = heapq.heappop(self._scheduled)
            handle._scheduled = False

As I see it, currently we peek into the future time.  Why don't we do 

        end_time = self.time() - self._clock_resolution

to guarantee that timeouts will always be triggered *after* the requested time, not before?  I don't see how the performance can become worse if we do this.
Date User Action Args
2017-09-21 21:41:54yselivanovsetrecipients: + yselivanov, gvanrossum, pitrou, vstinner, r.david.murray, germn
2017-09-21 21:41:54yselivanovsetmessageid: <>
2017-09-21 21:41:54yselivanovlinkissue31539 messages
2017-09-21 21:41:54yselivanovcreate