close method
Closes this instance.
This will also end all streams registered with registerStream.
Implementation
@mustCallSuper
Future<void> close() async {
_isShuttingDown = true;
for (final stream in _activeKeyStreams.values) {
await stream.close();
}
while (_pendingTimers.isNotEmpty) {
await _pendingTimers.first.future;
}
_activeKeyStreams.clear();
}