def with_state_lock

cswap-bend-cli@0.1.0.0 · daemon/state.bend:62

import cswap-bend-cli@0.1.0.0/daemon/state.bend as State
import 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)

Uses (4)

Used by (3)