-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
refactor(Worklets): move JSScheduler #6762
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
Conversation
a24c83c to
e7eb4a2
Compare
packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp
Show resolved
Hide resolved
packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp
Show resolved
Hide resolved
packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp
Show resolved
Hide resolved
packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h
Show resolved
Hide resolved
piaskowyk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the additional explanation that every turbo module has its own reference to the JS call invoker, and that this change is to leverage their own reference instead of cross-passing, this change makes sense to me. However, before we proceed with the merge, let's consider Tomek's comments.
## Summary This pull requests moves `JSScheduler`, a class responsible for scheduling operations back to the JavaScript thread, to Worklets. - `JSScheduler` is now available from `WorkletsModuleProxy` in cpp and that's how `ReanimatedModuleProxy` obtains it when it needs it. More sophisticated APIs will be made in the future. - Both `ReanimatedModule` and `WorkletsModule` are now responsible to forward `jsCallInvoker` to their own Proxy modules. `jsCallInvoker` is no longer available in `JSScheduler`. ## Test plan CI
## Summary This pull requests moves `JSScheduler`, a class responsible for scheduling operations back to the JavaScript thread, to Worklets. - `JSScheduler` is now available from `WorkletsModuleProxy` in cpp and that's how `ReanimatedModuleProxy` obtains it when it needs it. More sophisticated APIs will be made in the future. - Both `ReanimatedModule` and `WorkletsModule` are now responsible to forward `jsCallInvoker` to their own Proxy modules. `jsCallInvoker` is no longer available in `JSScheduler`. ## Test plan CI
## Summary This pull requests moves `JSScheduler`, a class responsible for scheduling operations back to the JavaScript thread, to Worklets. - `JSScheduler` is now available from `WorkletsModuleProxy` in cpp and that's how `ReanimatedModuleProxy` obtains it when it needs it. More sophisticated APIs will be made in the future. - Both `ReanimatedModule` and `WorkletsModule` are now responsible to forward `jsCallInvoker` to their own Proxy modules. `jsCallInvoker` is no longer available in `JSScheduler`. ## Test plan CI
## Summary This pull requests moves `JSScheduler`, a class responsible for scheduling operations back to the JavaScript thread, to Worklets. - `JSScheduler` is now available from `WorkletsModuleProxy` in cpp and that's how `ReanimatedModuleProxy` obtains it when it needs it. More sophisticated APIs will be made in the future. - Both `ReanimatedModule` and `WorkletsModule` are now responsible to forward `jsCallInvoker` to their own Proxy modules. `jsCallInvoker` is no longer available in `JSScheduler`. ## Test plan CI
Summary
This pull requests moves
JSScheduler, a class responsible for scheduling operations back to the JavaScript thread, to Worklets.JSScheduleris now available fromWorkletsModuleProxyin cpp and that's howReanimatedModuleProxyobtains it when it needs it. More sophisticated APIs will be made in the future.ReanimatedModuleandWorkletsModuleare now responsible to forwardjsCallInvokerto their own Proxy modules.jsCallInvokeris no longer available inJSScheduler.Test plan
CI