Dirlock.take: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/dirlock.bend as Dirlock Lines 87-92 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=87&end_line=92 import Base import cswap-bend-cli@0.1.0.0/fs.bend as Fs import cswap-bend-cli@0.1.0.0/act.bend as Act import cswap-bend-cli@0.1.0.0/fs/write.bend as FsW # Take the lock at `dir` (its parent is created), waiting up to `timeout_ms`. def take(+dir: String, +timeout_ms: U32, +staleness: U32) -> Act.of(Unit): do ActM: FsW.mkdir_p(Fs.dirname(dir)) first : Bool <- take_once(dir) wait(tries(timeout_ms), dir, staleness, first) 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=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=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=take_once https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&name=tries https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&name=wait https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs/write.bend&name=mkdir_p https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs.bend&name=dirname