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

Make native modules to use JS queue #6284

Merged
2 commits merged into from
Oct 21, 2020
Merged

Make native modules to use JS queue #6284

2 commits merged into from
Oct 21, 2020

Conversation

vmoroz
Copy link
Member

@vmoroz vmoroz commented Oct 20, 2020

Surprisingly, we had a bug that all NativeModules 2.0 use UI queue to run their code. We call NativeModules 2.0 the native modules that run on top of the ABI safe API in the ReactNative for Windows.
In this change we switch them to use the JS queue as it supposed to be.

Microsoft Reviewers: Open in CodeFlow

@vmoroz vmoroz requested review from acoates-ms and a team October 20, 2020 17:06
@vmoroz vmoroz requested a review from a team as a code owner October 20, 2020 17:06
@vmoroz vmoroz added the Breaking Change This PR will break existing apps and should be part of the known breaking changes for the release label Oct 20, 2020
@dannyvv
Copy link
Member

dannyvv commented Oct 20, 2020

Will this also apply to viewmanagers? If so we'd probably have to audit all of them to ensure they jump to the UI thread for UI operations....

@acoates-ms
Copy link
Contributor

UIManager posts most of its methods to the UIThread. By the time it gets to the ViewManager most things are UI thread. There is an exception on some of the view config constants that might be called from the JS thread.

@vmoroz vmoroz added the AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity) label Oct 20, 2020
@ghost
Copy link

ghost commented Oct 20, 2020

Hello @vmoroz!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 10 hours, a condition that will be fulfilled in about 8 hours 4 minutes. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

Copy link

@NikoAri NikoAri left a comment

Choose a reason for hiding this comment

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

:shipit:

@Khalef1
Copy link
Contributor

Khalef1 commented Oct 30, 2020

Removing "backport approved" label. After some internal discussions, we decided not to backport this one as it is a breaking change.

rozele pushed a commit to rozele/react-native-windows that referenced this pull request Oct 6, 2021
* Make native modules to use JS queue

* Change files
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity) Breaking Change This PR will break existing apps and should be part of the known breaking changes for the release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants