Threading and locking
Johannes Stezenbach
js at sig21.net
Tue Nov 30 14:22:49 GMT 2010
Hi,
On Tue, Nov 30, 2010 at 02:25:29PM +0100, Sebastian Spaeth wrote:
>
> by default we use threads to possibly sync many accounts at the same
> time. But we don't seem to protect/lock that 2 accounts deliver e.g. to
> the same local Maildir at the same time, which can lead to concurrency
> issues. Is this analysis correct? I see 2 solutions:
two accounts to the same Maildir cannot work, as dicussed here recently
(check where offlineimap stores the UID)
> 1) Lock on a per-repository basis rather than using one big offlineimap
> lock (which might not be needed anyway, why shouldn't I be allowed to
> run 2 offlineimap instances to sync separate accounts simultanously)
>
> 2) Do away with multiple-account in parallel synching. This would
> reduce the number of threads that we use. I would love to move to a
> situation where a "-1" (singlethreaded) option really does not invoke
> additional threads at all (which makes debugging much harder).
>
> Do people use the multiple-accounts at parallel feature at all? (I am
> not talking about multiple threads per account, but synching accounts in
> parallel)? Would it be acceptable to just work of one account after the
> other?
I'm syncing multiple accounts in parallel. I know one other guy
who does it, too. I don't mind if you change -1 to not use threads,
but please don't break or slow down multiple account sync.
Johannes
More information about the OfflineIMAP-project
mailing list