Ian Kelly <ian.g.ke...@gmail.com>: > On Thu, Dec 4, 2014 at 3:44 PM, Marko Rauhamaa <ma...@pacujo.net> wrote: >> So, what's the semantics of time.sleep(), select.select() et al wrt >> process or machine suspension? > > Rather than continue to speculate, I just tested this.
The test, of course, can only have one useful result... > So it seems that it can go either way depending on the OS and perhaps the > mechanism of suspension. ... and you got it. If the semantics had coincided, the question would remain unresolved; it could just have been a coincidence. However, the variance in the results means the semantics are unspecified. I think programmer's would need facilities to determine and control the suspension behavior. All things being equal, *early* wakeup is preferable to late wakeup because the application can then check for a spurious wakeup and go back to sleep. The reverse situation would be painful to deal with. Marko -- https://mail.python.org/mailman/listinfo/python-list