Skip to content

Wait for isolate to be destroyed before creating a new one #1864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

annagrin
Copy link
Contributor

@annagrin annagrin commented Jan 4, 2023

We seem to have a race condition where isolate starts without an isolate destruction in the middle.

See original issue for examples: flutter/flutter#117676

In this change we try to mitigate the issue by waiting for isolate to be destroyed before creating a new one.

@annagrin annagrin requested a review from elliette January 4, 2023 23:47
@elliette
Copy link
Contributor

elliette commented Jan 5, 2023

Discussed offline - we are going to try to fix the simultaneous isolates with:

  1. a thread pool to prevent concurrent isolate creation events
  2. calling destroyIsolate from createIsolate to guarantee the previous isolate has first been destroyed

@annagrin
Copy link
Contributor Author

annagrin commented Jan 6, 2023

Closing in favor of #1870

@annagrin annagrin closed this Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants