Merge branch 'master' of ssh://jpgarch@complete.org/~jpgarch/git/offlineimap
This commit is contained in:
commit
1d91fb7a96
@ -43,6 +43,10 @@ accounts = Test
|
|||||||
# greater than 1. To force it to synchronize only one account at a
|
# greater than 1. To force it to synchronize only one account at a
|
||||||
# time, set it to 1.
|
# time, set it to 1.
|
||||||
#
|
#
|
||||||
|
# Note: if you are using autorefresh and have more than one account,
|
||||||
|
# you must set this number to be >= to the number of accounts you have;
|
||||||
|
# since any given sync run never "finishes" due to a timer, you will never
|
||||||
|
# sync your additional accounts if this is 1.
|
||||||
|
|
||||||
maxsyncaccounts = 1
|
maxsyncaccounts = 1
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
from threading import *
|
from threading import *
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
from Queue import Queue
|
from Queue import Queue, Empty
|
||||||
import sys, traceback, thread
|
import sys, traceback, thread, time
|
||||||
from offlineimap.ui import UIBase # for getglobalui()
|
from offlineimap.ui import UIBase # for getglobalui()
|
||||||
|
|
||||||
profiledir = None
|
profiledir = None
|
||||||
@ -89,7 +89,7 @@ class threadlist:
|
|||||||
# Exit-notify threads
|
# Exit-notify threads
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
exitthreads = Queue(5)
|
exitthreads = Queue(100)
|
||||||
inited = 0
|
inited = 0
|
||||||
|
|
||||||
def initexitnotify():
|
def initexitnotify():
|
||||||
@ -112,8 +112,12 @@ def exitnotifymonitorloop(callback):
|
|||||||
"""
|
"""
|
||||||
global exitthreads
|
global exitthreads
|
||||||
while 1: # Loop forever.
|
while 1: # Loop forever.
|
||||||
callback(exitthreads.get(True))
|
try:
|
||||||
|
thrd = exitthreads.get(False)
|
||||||
|
callback(thrd)
|
||||||
exitthreads.task_done()
|
exitthreads.task_done()
|
||||||
|
except Empty:
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
def threadexited(thread):
|
def threadexited(thread):
|
||||||
"""Called when a thread exits."""
|
"""Called when a thread exits."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user