aboutsummaryrefslogtreecommitdiffstats
path: root/examples/archivemail_all
diff options
context:
space:
mode:
authorNikolaus Schulz <microschulz@web.de>2009-05-22 19:40:07 +0200
committerNikolaus Schulz <microschulz@web.de>2010-07-19 01:13:25 +0200
commit11103e2de2836f780adf17175f4fff189e1ebcaf (patch)
tree224140c7cbbf8d0d9b9624aa5d4fff2033f92382 /examples/archivemail_all
parentd706409c595a5994371d2b238b2a5e77be171f13 (diff)
downloadarchivemail-11103e2de2836f780adf17175f4fff189e1ebcaf.tar.gz
archivemail-11103e2de2836f780adf17175f4fff189e1ebcaf.tar.bz2
archivemail-11103e2de2836f780adf17175f4fff189e1ebcaf.zip
mbox locking: combine locking functions into one and swap lock order
We used to create a dotlock file first and then lock with fcntl; swap that order, since locking first with fcntl seems to be more common. This patch also adds general mbox lock/unlock methods, which call the dotlock and fcntl-lock methods, and moves the retry logic there. When the dotlock and fcntl methods fail to acquire a lock, they now raise a custom exception "LockUnavailable", which gets caught in the general lock() method. That way, if we succeed to acquire one lock but fail to acquire the other, we can release our locks at the upper level and retry.
Diffstat (limited to 'examples/archivemail_all')
0 files changed, 0 insertions, 0 deletions