fn first_per<K: Eq + Hash>(
claimed: Vec<CreditRegistration>,
key: impl Fn(&CreditRegistration) -> K,
twin: &str,
) -> Vec<CreditRegistration>Expand description
The first of the claimed rows per key. The claim query holds back a row whose twin is already
in flight, but cannot see a twin claimed alongside it; the rows dropped here keep their lock
until the claim’s transaction ends, and are claimable where they are after it.