close method
Shuts down the isolate.
Implementation
@override
Future<void> close() async {
// Drain in-flight log writes before tearing the isolate down, so
// fire-and-forget callers (Log.call does not await the returned
// Future) do not see their pending writes reject with StateError
// from [IsolatedObject.close].
await _inflight.wait;
await super.close();
}