flush method

void flush()

Writes everything queued, without pacing.

For the cases where latency matters more than smoothness - a prompt that has to appear now, or a teardown that has to leave nothing unparsed.

Implementation

void flush() {
  while (_pending.isNotEmpty) {
    if (_disposed) return;
    terminal.write(_pending.removeFirst());
  }
}