harn-flock 0.10.42

Advisory file locks with deadlines for the Harn programming language
Documentation
  • Coverage
  • 100%
    14 out of 14 items documented0 out of 3 items with examples
  • Size
  • Source code size: 15.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 401.56 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • burin-labs/harn
    16 1 21
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kennethsinder

Advisory file locks that cannot wait forever.

[std::fs::File::lock] has no timed form. A caller blocked on a lock nobody will release produces no error, no log line, and no stack — the process simply stops, and whatever supervises it can report only that it stopped. Recovering the reason means reproducing the wedge, and a rare interleaving can cost days of runner time to hit twice.

Every acquisition here carries a deadline and names the path it waited on, so a wedge surfaces as an error that says which lock and for how long.

The deadline is a diagnostic bound, not a coordination mechanism. Callers pick one from how long the critical section legitimately runs — schema initialization is milliseconds, a package install can be minutes — and set it far enough above that ceiling that expiry means something is wrong rather than merely slow.