Charles-François Natali added the comment: > It's not easy because I collect informations from various buildbots and different virtual machines. But I planned to try to summarize the overall work done on time in asyncio, select and selectors.
Thanks for the summary. > The first problem is that clocks and selectors have a different resolution. On Linux, poll() has a resolution of 1 ms, whereas clock_gettime(CLOCK_MONOTONIC) has a resolution better than 1 us (0.3 us according to my last test). time() having a better resolution than select() isn't an issue, so we're good. > On Windows, GetTickCount64() has a resolution of 15.6 ms, whereas GetQueuedCompletionStatus() has a resolution of 1 ms when HPET is enabled. > > Note: It looks like GetQueuedCompletionStatus() has the same resolution than GetTickCount64() when HPET is disabled. OK, so basically this means that with HPET, select() does block, but the clock resolution is too low, and reports an inaccurate elapsed time (and sometimes returns 0). So actually, no busy loop occurs even in this case. Wouldn't it be possible to use another clock for asyncio on Windows? I find surprising that we can't get better than 15.6ms with HPET... ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20505> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com