]> git.ipfire.org Git - thirdparty/tornado.git/commit
modified method _schedule_next of PeriodicCallback to handle sudden changes of the... 1290/head
authorPhilipp Engel <philipp@filzip.com>
Tue, 16 Dec 2014 14:43:06 +0000 (15:43 +0100)
committerPhilipp Engel <philipp@filzip.com>
Tue, 10 Feb 2015 11:04:51 +0000 (12:04 +0100)
commita5e7ee7a7fc673dcc6829142a7e35e8f1a17437b
treed13f6d6075dc4bb95997c54c932cc9c32f37f2a5
parentc229e261cee0bb3e8d0973ef07bf353023057a31
modified method _schedule_next of PeriodicCallback to handle sudden changes of the system time differently:
 * calculating next timeout value directly while advancing by a multiple of callback_time
 * when the system time changes, jumps into the future make the _schedule_next method do a busy wait.
 * on slow machines (RPi), jumps of a few months into the future can block the loop for a few minutes
=> added a check for big differences in current system time and the current value of the next scheduled timeout

On a first boot of an older RPi image, tornado sometime starts before the date&time were updated through NTP, hence blocking the ioloop for several minutes.
tornado/ioloop.py