Typestate lockfile API
For filesystem lockfiles, we are currently using fslock::LockFile
. Its API is suboptimal: the lock method returns a boolean telling you whether you got the lock(!) And there is no "lock guard" type you can use to express that a value represents a held lock.
We should switcb to a different file locking crate, or make a wrapper with a better API, or both.