docker-offlineimap/offlineimap
Eygene Ryabinkin 67d68c2fc8 IMAP: simplify locking and fix potential lock loss
Run the locked code under 'with': this guarantees that lock
will be released in any case.

This modification also avoids the case when our thread wasn't running
locked when exception was caught, another thread got the lock, our
code checked it via self.connectionlock.locked() and errorneously
released the lock thinking that is was running locked.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
2013-07-22 00:08:39 +04:00
..
folder Prune trailing whitespaces from code and documentation 2013-07-21 23:00:23 +04:00
repository Prune trailing whitespaces from code and documentation 2013-07-21 23:00:23 +04:00
ui Prune trailing whitespaces from code and documentation 2013-07-21 23:00:23 +04:00
utils Create global instance of command-line options 2013-02-11 23:34:18 +04:00
__init__.py Prune trailing whitespaces from code and documentation 2013-07-21 23:00:23 +04:00
accounts.py Create global instance of command-line options 2013-02-11 23:34:18 +04:00
CustomConfig.py Prune trailing whitespaces from code and documentation 2013-07-21 23:00:23 +04:00
error.py Introduce new error level FOLDER_RETRY 2011-09-06 19:00:21 +02:00
globals.py Create global instance of command-line options 2013-02-11 23:34:18 +04:00
imaplib2.py Prune trailing whitespaces from code and documentation 2013-07-21 23:00:23 +04:00
imaplibutil.py IMAPlib mixin class: pass 'readonly' exception to our callers 2012-08-11 11:59:26 +02:00
imapserver.py IMAP: simplify locking and fix potential lock loss 2013-07-22 00:08:39 +04:00
imaputil.py Improve 'find first quotation' regex 2012-08-21 16:58:32 +02:00
init.py Prune trailing whitespaces from code and documentation 2013-07-21 23:00:23 +04:00
localeval.py Update FSF address 2006-08-12 05:15:55 +01:00
mbnames.py Prune trailing whitespaces from code and documentation 2013-07-21 23:00:23 +04:00
syncmaster.py Exit "infinite" monitorloop when SyncRunner thread exits 2011-11-02 11:55:05 +01:00
threadutil.py Fix deadlock for IMAP folder synced in singlethreaded mode 2013-02-05 07:53:25 +04:00