docker-offlineimap/offlineimap/folder
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
..
__init__.py Use "from . import" for relative imports 2012-02-06 17:41:43 +01:00
Base.py Fix deadlock for IMAP folder synced in singlethreaded mode 2013-02-05 07:53:25 +04:00
Gmail.py Use "from . import" for relative imports 2012-02-06 17:41:43 +01:00
IMAP.py Fix IMAP folder throwing away time zone when parsing email Date headers 2012-10-03 11:16:13 +02:00
LocalStatus.py Use "with lock" pattern 2012-08-31 22:34:53 +02:00
LocalStatusSQLite.py Prevent modifications on a folder level to occur in dry-run 2012-02-17 13:17:05 +01:00
Maildir.py Prevent modifications on a folder level to occur in dry-run 2012-02-17 13:17:05 +01:00
UIDMaps.py Add missing OfflineImapError import in folder/UIDMaps.py 2012-07-30 20:10:11 +02:00