Skip to content

cherry-pick(worklets-0.9-stable): time-of-check and time-of-use destructor safety (#9790)#9922

Open
tjzel wants to merge 1 commit into
@tjzel/worklets-0.9-stable/cherry-pick-#9789from
@tjzel/worklets-0.9-stable/cherry-pick-#9790
Open

cherry-pick(worklets-0.9-stable): time-of-check and time-of-use destructor safety (#9790)#9922
tjzel wants to merge 1 commit into
@tjzel/worklets-0.9-stable/cherry-pick-#9789from
@tjzel/worklets-0.9-stable/cherry-pick-#9790

Conversation

@tjzel

@tjzel tjzel commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Cherry-picking #9790

## Summary

Currently the way we check if the runtime is alive for safe destructor
invocations has a chance to lead to crashes anyway, since the runtime
can get cleaned up immediately after the check, since it lacks a locking
mechanism.

## Test plan

The test example from #9789 works.

(cherry picked from commit 71774cb)
@tjzel tjzel marked this pull request as ready for review July 10, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant