diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-03 14:41:57 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-03 14:41:57 -0400 |
commit | ceb32f6063f169853fe97aa303c4fa0316a7da31 (patch) | |
tree | c7abd72f2edf7a0c055b64aa5a8dbf9a1a81d723 /doc/install.mdwn | |
parent | 2607479890ac2b2a1bd63aca10dd87c9199bf414 (diff) |
use types to partially prove correctness of journal locking code
My implementation does not guard against double locking of the journal. But
it does ensure that the journal is always locked when operated on, by using
a type that is only produced by lockJournal, and which is required as a
parameter of all functions that operate on the journal.
Note that I had to add the fooStale functions for cases where it does not
make sense to lock the journal when querying it. I was more concerned about
ensuring that anything that modifies the journal is locked.
setJournalFile's implementation ensures that any query of the journal will
get one value or the other atomically, even if the journal is being changed
at the time.
Diffstat (limited to 'doc/install.mdwn')
0 files changed, 0 insertions, 0 deletions