def with_dirlock

cswap-bend-cli@0.1.0.0 · dirlock.bend:97

import cswap-bend-cli@0.1.0.0/dirlock.bend as Dirlock
import Base
import cswap-bend-cli@0.1.0.0/act.bend as Act

97# Hold the directory lock around `act`, released whatever `act` answers.
98def with_dirlock(-A: Type, +dir: String, +timeout_ms: U32, +staleness: U32, act: Act.of(A)) -> Act.of(A):
99  do ActM<A>:
100    take(dir, timeout_ms, staleness)
101    Act.finally(A, act, release(dir))

Uses (9)

Used by (1)