flush

abstract suspend fun flush(newGeneration: Generation)

Discards all internal state and enters newGeneration.

This is the only epoch boundary a decoder has. Every frame received after it carries newGeneration, and every frame decoded before it is gone rather than relabelled.

Called after the queues have been cleared and before any packet of the new generation is offered. The order matters: flushing before the queues are cleared lets a stale packet reach a freshly flushed decoder.