Threading and locking
Sebastian at SSpaeth.de
Wed Dec 1 09:27:25 GMT 2010
On Tue, 30 Nov 2010 14:48:14 +0000, Rupert Swarbrick <rswarbrick at gmail.com> wrote:
> On Tue, 2010-11-30 at 14:25 +0100, Sebastian Spaeth wrote:
> > Hi all,
> > 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:
> Isn't the point of the Maildir format that you don't have to do locking?
> Or have I misunderstood?
If you sync, e.g. 2 Accounts with the same remote IMAP account, the
results of that sync would be nondeterministic as it depends what has
already be synced.
If syncing 2 accounts to the same maildir, e.g. "IMAP<->Maildir1" and
"Maildir1<->Maildir2", the same holds true. We wouldn't get problems
with locking, Maildir is designed to avoid that, you are right. But we
sync both Accounts in parallel, and the result would be unpredictable.
I would be happy to be proven wrong :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the OfflineIMAP-project