Move-only; block for the lease with acquire().
LeaseT | the |
Functions
Request · 3 overloads
Wrap the owner-supplied future.
fut | the future the owner fulfills. |
O(1).
none.
Move-assign (a request is move-only).
*this.
O(1).
none.
Redeem the request: wait for the owner's grant, then return the lease.
(Today's owner grants synchronously inside rread()/rwrite<…>(), so the wrapped future is already fulfilled and this returns at once.) on_interrupt is the requester's interruption handler — wired to the granted lease so if the owner later needs the lease back the handler fires. Omit it to rely purely on the lease's valid()/expired() polling. One-shot.
on_interrupt | optional handler to run when the owner asks the lease to yield. |
the granted lease.
O(1) once granted; blocks only until the owner fulfills the request (already done by the time a Request exists today).
none, unless on_interrupt is supplied — then one callback holder (via Lease::on_interrupt).
one-shot: a second acquire() on the same request throws std::future_error. on_interrupt later fires on whichever thread polls the lease's valid() — never asynchronously.
Constants & variables
owner-fulfilled; never exposed to cheatah.
