def with_state_lock
import cswap-bend-cli@0.1.0.0/daemon/state.bend as Stateimport Base
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/lock.bend as Lock
62# Hold the state lock around `act`.
63def with_state_lock(-A: Type, +root: String, act: Act.of(A)) -> Act.of(A):
64 Lock.with_lock(A, lock_path(root), 10000, act)