threading: simplify the monitoring code for threads

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht
2016-05-12 05:29:49 +02:00
parent 87cf6bda02
commit a1f40af033
2 changed files with 31 additions and 32 deletions

View File

@ -389,11 +389,10 @@ class OfflineImap:
else:
# multithreaded
t = threadutil.ExitNotifyThread(target=syncmaster.syncitall,
name='Sync Runner',
kwargs = {'accounts': syncaccounts,
'config': self.config})
name='Sync Runner',
kwargs={'accounts': syncaccounts, 'config': self.config})
t.start()
threadutil.exitnotifymonitorloop(threadutil.threadexited)
threadutil.exitnotifymonitorloop()
if not options.dryrun:
offlineimap.mbnames.write(True)