docker-offlineimap/offlineimap
X-Ryl669 5c842c01bd Fix deadlock for IMAP folder synced in singlethreaded mode
The problem lies in the fact that offlineimap.folder.Base's method
syncmessagesto_copy() uses threaded code everytime it is suggested by
the derived class's suggeststhreads() (currently, only IMAP does this
suggestion), but offlineimap/init.py will not spawn the
exitnotifymonitorloop() from offlineimap.threadutil.

The root cause is that ExitNotifyThread-derived threads need
offlineimap.threadutil's exitnotifymonitorloop() to be running the
cleaner for the exitthreads Queue(), because it fills the queue via
the run() method from this class: it wants to put() itself to the
Queue on exit, so when no exitnotifymonitorloop() is running, the
queue will fill up.  And if this thread is an instance of
InstanceLimitedThread that hits the limit on the number of threads,
then it will hold the instancelimitedsems[] semaphore will prevent
other InstanceLimitedThread()s of the same name to pass its start()
method.

The fix is to avoid using threaded code if we're running
single-threaded.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
Obtained-from: X-Ryl669 <boite.pour.spam@gmail.com>
2013-02-05 07:53:25 +04:00
..
folder Fix deadlock for IMAP folder synced in singlethreaded mode 2013-02-05 07:53:25 +04:00
repository LocalStatus._folders needs to be {} not None 2012-09-01 02:58:14 +02:00
ui Don't output initial blurb in "quiet" mode 2012-08-31 23:11:11 +02:00
utils And add forgotten __init__.py for offlineimap.utils 2013-02-05 07:52:25 +04:00
__init__.py Release v6.5.5-rc2 2012-09-05 17:40:09 +02:00
accounts.py Fix deadlock for IMAP folder synced in singlethreaded mode 2013-02-05 07:53:25 +04:00
CustomConfig.py Implement CustomConfig.set_if_not_exists() 2012-02-17 10:28:59 +01:00
error.py Introduce new error level FOLDER_RETRY 2011-09-06 19:00:21 +02:00
imaplib2.py imaplib2: bump upstream version 2.29 --> 2.33 2012-04-19 13:22:03 +02:00
imaplibutil.py IMAPlib mixin class: pass 'readonly' exception to our callers 2012-08-11 11:59:26 +02:00
imapserver.py Replace thread.get_ident() 2012-02-06 17:41:43 +01:00
imaputil.py Improve 'find first quotation' regex 2012-08-21 16:58:32 +02:00
init.py Fix deadlock for IMAP folder synced in singlethreaded mode 2013-02-05 07:53:25 +04:00
localeval.py Update FSF address 2006-08-12 05:15:55 +01:00
mbnames.py explicitly define symbols to import instead of 'import *' 2011-05-09 22:43:03 +02: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