Skip to main content

Module lease

Expand description

Leasing the rows a verify iteration asks about, so no concurrent iteration asks about them too.

Structs§

VerifyAttempt 🔒
What the lease wrote for its row: the attempt count that sets an uncertain row’s backoff, and the next course unit poll. Only claim_and_lease makes one.

Functions§

attempt_facts 🔒
The row’s facts under the attempt the lease counted, not the count the row was claimed with, so the backoff advances once per attempt.
claim_and_lease 🔒
Claims up to limit of flow’s due rows, counts an attempt on each and leases it until its next poll would be due, or the iteration’s registry calls run out, so a concurrent iteration cannot poll the same row. Each answer overwrites its own row’s schedule.

Type Aliases§

Leased 🔒
A claimed row, leased where it stands, with the verify attempt the lease counted for it.