Active waiting?
Sebastian Spaeth
Sebastian at SSpaeth.de
Mon Mar 23 21:48:42 GMT 2015
Am 23. März 2015 18:27:00 MEZ, schrieb Alvaro Gamez <alvaro.gamez at hazent.com>:
>On my previous email I've found keepalive timer to be the worst
>offender.
Well, IMAP IDLE will always prevent the phone from sleeping deepnand long as it is supposed to detect a server message instantaneously.
>I've never done any python threading programming and don't know much
>about
>offlineimap threading architecture, so I don't know if this is
>possible,
>but could this simple patch solve the issue?
>
> self.ui.debug('imap', 'keepalive: waiting for timeout')
>- event.wait(timeout)
>+ time.sleep(timeout)
> self.ui.debug('imap', 'keepalive: after wait')
This would ALWAYS wait 'timeout' seconds rather UP TO 'timeout' seconds when we need the connection again. So no :-).
Sebastian
--
Sent from mobile phone. Please excuse brevity.
More information about the OfflineIMAP-project
mailing list