learn singlethreadperfolder configuration option

To further ensure that messages are synchronized strictly in UID
order, this option can be set to cause only one thread to be used
to synchronise an individual folder, though other folders may
be synchronized simultaneously by other threads.

Signed-off-by: James E. Blair <corvus@gnu.org>
Based-on-patch-by: James E. Blair <corvus@gnu.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
James E. Blair
2012-07-17 19:47:06 -07:00
committed by Nicolas Sebrecht
parent a5ea1827fb
commit 560363ef73
2 changed files with 22 additions and 1 deletions

View File

@ -79,6 +79,11 @@ class IMAPFolder(BaseFolder):
# Interface from BaseFolder
def suggeststhreads(self):
onethread = self.config.getdefaultboolean(
"Repository %s"% self.repository.getname(),
"singlethreadperfolder", False)
if onethread is True:
return False
return not globals.options.singlethreading
# Interface from BaseFolder