Message 209245 - Python tracker (original) (raw)

Once again, what's wrong with your initial approach of ceiling the timeout?

It looks like changing the rounding method doesn't solve anything. selector.select(timeout) may still take less than timeout, so it doesn't give any guarantee.

But what problem does it cause if, once in a while, the call takes less than the passed timeout? If that's the case, you'll simply perform another loop, an wake up 1ms later, that's all.

There's a lot of call written this way, and this has never been a problem: so far, you still didn't give an example of problematic behavior.