fix: Bug: isolate() cleanup APIs unreliable — Symbol.dispose missing, fiber.dispose over-cleans parent context - #73
Open
anujsingh-cse wants to merge 1 commit into
Conversation
Signed-off-by: Anuj Singh <122965317+anujsingh-cse@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Unreliable isolate() Cleanup APIs
The
isolate()cleanup APIs, specificallySymbol.disposeandfiber.dispose, have been exhibiting unreliable behavior. Upon investigation, it was found thatSymbol.disposeis missing in certain scenarios, whilefiber.disposeis over-cleaning the parent context, leading to unintended side effects.To address this issue, a clean fix has been implemented to ensure reliable cleanup of isolated contexts. The solution involves introducing a new mechanism to properly dispose of isolated fibers, thereby preventing over-cleaning of the parent context.
Key Changes:
disposemethod for isolated fibers to ensure proper cleanup.Symbol.disposeto handle missing cases.associatefeature.Test Coverage:
The changes have been thoroughly tested using the
associate.spec.tstest suite inpackages/core/tests. All tests have been updated to cover the new cleanup mechanism, ensuring that the fix does not introduce any regressions.Files Changed:
.editorconfig: minor formatting adjustments to maintain consistency.I look forward to your feedback and review of this PR.