Dirlock.wait: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/dirlock.bend as Dirlock Lines 72-82 of cswap-bend-cli@0.1.0.0/dirlock.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&start_line=72&end_line=82 import Base import cswap-bend-cli@0.1.0.0/act.bend as Act # Wait for the lock `fuel` more times, taking over a stale one. def wait(+fuel: Nat, +dir: String, +staleness: U32, +got: Bool) -> Act.of(Unit): match fuel got: case _ True{}: Act.pure(Unit, Unit{}) case 0n False{}: Act.fail(Unit, 4, busy_msg(dir)) case 1n++p False{}: do ActM: again : Bool <- retake(dir, staleness) wait(p, dir, staleness, again) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=fail https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=of https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=pure https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&name=ActM https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&name=ActM.bind https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&name=busy_msg https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&name=retake