Message 116816 - Python tracker (original) (raw)

Unfortunately, select doesn't necessarily update the timeout variable with the remaining time, so we can't rely on this. This would mean having the select enclosed within gettimeofday and friends, which seems a bit overkill...

Well, given the general cost of Python function calls and bytecode interpretation, it would probably not be much of a runtime overhead. So it's mainly some additional, not very exciting code to write :-)

(luckily, in 3.2 we have a cross-platform gettimeofday() abstraction in pytime.h which will ease things quite a bit)