Dirlock.retake: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/dirlock.bend as Dirlock Lines 64-70 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=64&end_line=70 import Base import cswap-bend-cli@0.1.0.0/act.bend as Act # Take over a stale lock, wait a beat, try again. def retake(+dir: String, +staleness: U32) -> Act.of(Bool): do ActM: st : Bool <- is_stale(dir, staleness) reclaim(st, dir) Act.lift(Unit, IO.sleep(poll_ms())) take_once(dir) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.sleep 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=lift 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/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=is_stale https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&name=poll_ms https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&name=reclaim https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&name=take_once