tick method

void tick()

Runs one exchange now. Overlapping ticks collapse: a tick that fires while the previous exchange is still running is skipped, so a slow peer cannot pile up exchanges.

Implementation

void tick() {
  if (_ticking) return;
  _ticking = true;
  _exchange().whenComplete(() => _ticking = false);
}