Open chinmaygarde opened 5 years ago
cc @rmacnak-google @a-siva
@rmacnak-google IIUC, your patch will make it so that that shutdown of Dart managed isolate is safe, but I still have to shut down engine managed isolates correct?
Dart_Cleanup will send an unwind error to all isolates and wait for
Provided the engine managed isolates respond to an unwind error (Dart_IsFatalError) by eventually calling Dart_ShutdownIsolate, the engine shouldn't need to perform its own shutdown broadcast.
any Isolate.spawn/spawnUri that is in progress
Does this mean waiting for the isolate create callback to return?
About the rest, sounds good and thanks for clarifying.
Currently, isolates could be in the middle of initialization (and making
dart_api.h
calls) when the call theDart_Cleanup
is made on another thread. Embedders not resilient to unwind errors will run into crashes.