close method
Close the Runtime and dispose the event recorder.
Implementation
Future<void> close({
Duration gracePeriod = Duration.zero,
bool interruptAfterGracePeriod = false,
}) async {
if (_closed) return;
_closed = true;
try {
await runtime.close(
gracePeriod: gracePeriod,
interruptAfterGracePeriod: interruptAfterGracePeriod,
);
} finally {
observer.dispose();
}
}