> We currently close the database as soon as possible while we handle the status > backend but this is still too early because autorefresh induces looping on > this > code block. > > Instead of delaying the closing outside of the loop, it's easier to delay the > opening as late as possible (inside the loop). The downside is that the > database > is opened/closed more than once when autorefresh is enabled. The good news is > that this make the code much easier.
Thanks, what do you think about the idea of not closing connection to db when using autorefresh? Opening and closing is quite expensive and maybe we could open at the beginning and close on some ctrl+c signal. _______________________________________________ OfflineIMAP-project mailing list: [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project OfflineIMAP homepages: - https://github.com/OfflineIMAP - http://offlineimap.org
