Singlethreading patch series

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Jan 10 10:00:17 GMT 2011


Please find the updated patch series that implements single threading. I
start a new thread as the other one is long enough with 44 messages
already. The series is based on the "next" branch (to ease my and
Nicolas merging pain). If you prefer this against nicolas' master, let
me know and I'll do the rebasing.

I split the patches to be smaller and more self-contained and improved
the commit messages. While I had to touch the one "except:" part in
LocalStatus.py that we previously talked about, I decided to do
completely away with the Exception catching. Even catching
EnvironmentErrors as Johannes had suggested seems to much. If there is
an IOError or OSError when os.fsyncing() our status data base something
is really wrong and fishy and we should loudly complain rather than
silently ignore it.

fsync() is available on both unix and Windows (since python 2.2), so
that part should simply never fail.

As for the conditions when we invoke "singlethreading", they are still:

 Don't sync accounts in subthreads when:
     1) option singlethreading has been chosen
     2) There is only 1 account to sync
     3) maxacountsync setting is 1 (default)

Nicolas had asked about this and "singlethreading" is slightly misleading
here, as each account can still be synced in a multithreaded fashion in
cases 2 and 3). 

I improved the commit message to say:
    Do note that in cases 2) and 3) each account will still be synced in
    multithreaded fashion (within the account), we will just not spawn
    separate threads to launch and supervise the account synchronization.

However, whether we really want to use "account single threading" in
cases 2) and 3) is open to debate. I would be perfectly fine if we only
used it in the 1) case.

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110110/7b94e665/attachment.sig>


More information about the OfflineIMAP-project mailing list