Optionalclock?: ClockRead for the lease and re-arm comparisons and for every stamp. Defaults to the wall clock.
OptionalexecutionContext?: DeclaredExecutionContextDeclared execution context stamped on the release audit rows — a sweeper runtime declares itself here (identity is its token).
Release every pending-effect claim whose lease has expired, and re-arm every entry no drain has claimed for DEFAULT_EFFECT_LEASE_MS, so a drain picks each of them up. A released claim gets an
effectClaimReleasedaudit row; a re-armed entry gets a freshqueuedAtand no row. An entry is re-armed at most once per DEFAULT_EFFECT_LEASE_MS.One CAS write per call; concurrent sweeps and drains are safe, and a sweep that loses a race re-reads, then fails after a bounded number of attempts. Dispatching the entries is the next
drainEffectscall's job. To kill a stuck entry without redispatching, report it viacompleteEffect({status: 'failed'})instead.