terminate method

void terminate()

Terminates all commands by throwing TerminateException.

Implementation

void terminate() {
  final commands = ListQueue.from(_commandsQueue);
  _commandsQueue.clear();
  for (final command in commands) {
    command.terminate();
  }
}