Skip to content
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

Fix TS and initialization order for executeUIRuntimeSync. #5516

Merged

Conversation

tjzel
Copy link
Collaborator

@tjzel tjzel commented Dec 21, 2023

Summary

Minor changes to #4300.

Test plan

🚀

@@ -65,10 +65,10 @@ class WorkletRuntime : public jsi::HostObject,
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt) override;

private:
std::recursive_mutex runtimeMutex_;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be moved because it's used in WorkletRuntime::WorkletRuntime constructor as an argument of makeRuntime before its own std::recursive_mutex default constructor was called.
While it will probably work because we are only passing the address there, I think it's safer to have it initialized already.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, and you're right! Yes, it works because we are passing a pointer instead of the value of the field

@piaskowyk piaskowyk merged commit f5c312a into @piaskowyk/sync-calls-on-ui-runtime Dec 21, 2023
14 checks passed
@piaskowyk piaskowyk deleted the @tjzel/sync-calls-on-ui-runtime branch December 21, 2023 21:41
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