def reserve

cswap-bend-cli@0.1.0.0 · ustore.bend:204

import cswap-bend-cli@0.1.0.0/ustore.bend as Ustore
import Base
import cswap-bend-cli@0.1.0.0/act.bend as Act

204# Atomically win the right to fetch: re-check each slot's eligibility and
205# stamp a 90 s lease under the lock (UsageStore.reserve). `respect` is the
206# on-demand mode (stale AND poll-due), `repair` also frees a reset-parked plan.
207def reserve(+root: String, ids: List<&2, Id>, +now: U32, +respect: Bool, +repair: Bool, +tick: Nat) -> Act.of(List<&2, Claim>):
208  with_usage_lock(List<&2, Claim>, root, reserve.act(root, ids, now, respect, repair, tick))

Uses (10)

Used by (1)