pub async fn gate_checked_after_the_queue<U, A, AFut, D, DFut, R, RFut>(
ud: &U,
rx: &mut Receiver<Envelope>,
id: &InstrumentId,
price: Price,
in_flight: A,
degrade: D,
release: R,
)Expand description
A command that waits in the queue of its instrument is checked against the gate again when its turn comes: a gate that closed meanwhile stops it, and nothing is sent.
Two places on one instrument go out together. The first is held at the broker (in_flight returns when
the broker has it in hand), the second waits in the queue of the instrument. Then degrade closes the
gate (it breaks the order streams) and the test waits for the Reconnected event, and release lets
the broker finish the first one. Checks:
- the first place is
OkorUnknown(it was sent before the gate closed); - the second is [
Error::Degraded]: it did not go out after the queue; - after
reconcile(&[]), of the two cids only the first is at the broker. Both are cancelled.
§Panics
With [conformance:gate_checked_after_the_queue] <reason>.