if so, it might be vs timing attacks
This crummy Sleep() implementation has some nice effects on programmers. Those who like to solve problems with lots of copy/paste code are forced to think about using proper synchronization primitives when running high resolution loops that wait for events, or their code just won't run very fast.
[1] http://social.msdn.microsoft.com/forums/en-US/clr/thread/fac...
When you do sleep, depending on the hardware, the OS, the configuration, the kernel flags, etc. the minimum you actually get is around 38.
But that varies.
if they wanted noisy sleep, it should be something like
sleep(func(rand()))
Or was this not noticed because all the major frameworks like cherrypy and twisted are still using the pyopenssl wrapper?
Is there any evidence that this bugfix actually changes the performance?
ssl/s2_pkt.c:
#ifdef PKT_DEBUG
if (s->debug & 0x01) sleep(1);
#endif
There are two references like that to PKT_DEBUG (read and write); the only other is:ssl/ssl_locl.h:
/*#define PKT_DEBUG 1 */
I suspect this is a non-issue. Interesting though.