Perform legacy global lock in addition to new per-account lock
We simply lock OfflineImap the same global way that we have always done in addition to the previously implemented per-account lock. We can keep both systems in parallel and then after a few stable releases, drop the old-style global lock. by reverting this patch Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
@ -172,6 +172,7 @@ class SyncableAccount(Account):
|
||||
|
||||
def lock(self):
|
||||
"""Lock the account, throwing an exception if it is locked already"""
|
||||
# Take a new-style per-account lock
|
||||
self._lockfd = open(self._lockfilepath, 'w')
|
||||
try:
|
||||
fcntl.lockf(self._lockfd, fcntl.LOCK_EX|fcntl.LOCK_NB)
|
||||
|
Reference in New Issue
Block a user