stopKeepAliveThread method
void
stopKeepAliveThread()
Stops the keep-alive thread, allowing the application to shut down.
This completes the internal Completer, releasing the await in startKeepAliveThread and allowing the process to exit gracefully.
Implementation
void stopKeepAliveThread() {
if (completer.isCompleted) return;
completer.complete();
}