Reservation

inner class Reservation(source)

A scoped capture of messages matching predicate. While active, a matching message delivered to this mailbox is routed into the reservation's private buffer with priority over waiters, the pending queue, and arrival listeners — so a reserved conversation (e.g. a Contract-Net round) is never seen or consumed by an unrelated receiver on the same mailbox (a statechart onMessage handler, another receiveMessage). Call release when done.

Functions

Link copied to clipboard
fun collected(): List<M>

Messages captured so far, in arrival order.

Link copied to clipboard
fun release()

Stop capturing; subsequent matching messages flow normally.