-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Implement microtasks using new JSI method #43397
Conversation
This pull request was exported from Phabricator. Differential Revision: D54687056 |
This pull request was exported from Phabricator. Differential Revision: D54687056 |
Summary: Pull Request resolved: facebook#43397 Changelog: [internal] This migrates the Hermes-specific use of microtasks to an engine agnostic implementation based on the new JSI method to queue microtasks. Differential Revision: D54687056
9ad2da3
to
7532d17
Compare
Base commit: e2157f0 |
This pull request was exported from Phabricator. Differential Revision: D54687056 |
Summary: Pull Request resolved: facebook#43397 Changelog: [internal] This migrates the Hermes-specific use of microtasks to an engine agnostic implementation based on the new JSI method to queue microtasks. Differential Revision: D54687056
7532d17
to
cb884e2
Compare
This pull request was exported from Phabricator. Differential Revision: D54687056 |
Summary: Pull Request resolved: facebook#43397 Changelog: [internal] This migrates the Hermes-specific use of microtasks to an engine agnostic implementation based on the new JSI method to queue microtasks. Differential Revision: D54687056
cb884e2
to
49082f9
Compare
Summary: Pull Request resolved: facebook#43397 Changelog: [internal] This migrates the Hermes-specific use of microtasks to an engine agnostic implementation based on the new JSI method to queue microtasks. Reviewed By: sammy-SC Differential Revision: D54687056
This pull request was exported from Phabricator. Differential Revision: D54687056 |
49082f9
to
5f7b508
Compare
…es before writing Differential Revision: D54690126
…only overrides Differential Revision: D54687055
Differential Revision: D54680056
Summary: Pull Request resolved: facebook#43397 Changelog: [internal] This migrates the Hermes-specific use of microtasks to an engine agnostic implementation based on the new JSI method to queue microtasks. Reviewed By: sammy-SC Differential Revision: D54687056
This pull request was exported from Phabricator. Differential Revision: D54687056 |
5f7b508
to
4997bd5
Compare
This pull request has been merged in 5833eb5. |
… by RN (#28472) ## Summary We want to enable the new event loop in React Native (react-native-community/discussions-and-proposals#744) for all users in the new architecture (determined by the use of bridgeless, not by the use of Fabric). In order to leverage that, we need to also set the flag for the React reconciler to use microtasks for scheduling (so we'll execute them at the right time in the new event loop). This migrates from the previous approach using a dynamic flag (to be used at Meta) with the check of a global set by React Native. The reason for doing this is: 1) We still need to determine this dynamically in OSS (based on Bridgeless, not on Fabric). 2) We still need the ability to configure the behavior at Meta, and for internal build system reasons we cannot access the flag that enables microtasks in [`ReactNativeFeatureFlags`](https://github.com/facebook/react-native/blob/6c28c87c4d5d8a9f5be5e02cd7d3eba5b4aaca8c/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js#L121). ## How did you test this change? Manually synchronized the changes to React Native and ran all tests for the new architecture on it. Also tested manually. > [!NOTE] > This change depends on facebook/react-native#43397 which has been merged already
… by RN (facebook#28472) ## Summary We want to enable the new event loop in React Native (react-native-community/discussions-and-proposals#744) for all users in the new architecture (determined by the use of bridgeless, not by the use of Fabric). In order to leverage that, we need to also set the flag for the React reconciler to use microtasks for scheduling (so we'll execute them at the right time in the new event loop). This migrates from the previous approach using a dynamic flag (to be used at Meta) with the check of a global set by React Native. The reason for doing this is: 1) We still need to determine this dynamically in OSS (based on Bridgeless, not on Fabric). 2) We still need the ability to configure the behavior at Meta, and for internal build system reasons we cannot access the flag that enables microtasks in [`ReactNativeFeatureFlags`](https://github.com/facebook/react-native/blob/6c28c87c4d5d8a9f5be5e02cd7d3eba5b4aaca8c/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js#L121). ## How did you test this change? Manually synchronized the changes to React Native and ran all tests for the new architecture on it. Also tested manually. > [!NOTE] > This change depends on facebook/react-native#43397 which has been merged already
Summary:
Changelog: [internal]
This migrates the Hermes-specific use of microtasks to an engine agnostic implementation based on the new JSI method to queue microtasks.
Differential Revision: D54687056