threading: minor improvements

Factorize string, enhance comments and minor code improvements.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht
2016-05-17 03:53:09 +02:00
parent f93b0963fa
commit 83539f8601
4 changed files with 27 additions and 12 deletions

View File

@ -351,11 +351,12 @@ class SyncableAccount(Account):
"[%s]"% (localfolder, localfolder.repository))
continue # Ignore filtered folder
if not globals.options.singlethreading:
thread = InstanceLimitedThread(\
thread = InstanceLimitedThread(
instancename = 'FOLDER_' + self.remoterepos.getname(),
target = syncfolder,
name = "Folder %s [acc: %s]"% (remotefolder.getexplainedname(), self),
args = (self, remotefolder, quick))
args = (self, remotefolder, quick)
)
thread.start()
folderthreads.append(thread)
else: