withLeaseWithin
withLeaseWithin<
A,E,R>(store,options):Effect<Option<A>,LeaseFailure|E,R>
Defined in: packages/core/src/session/lease.ts:134
Acquires a lease within a bounded window instead of dropping the first miss.
A chat interaction can arrive while another process is committing the same
session. The old behaviour returned Option.none immediately, so the press
was lost even though the lease would have been free a few milliseconds later.
This keeps the interaction in the interactionMachine waiting state until
the deadline, then gives up explicitly.
Type Parameters
Section titled “Type Parameters”A
E
R
Parameters
Section titled “Parameters”options
Section titled “options”WindowLeaseOptions<A, E, R>
Returns
Section titled “Returns”Effect<Option<A>, LeaseFailure | E, R>