Uh oh!
There was an error while loading. Please reload this page.
[iOS] Fixes main thread stuck when reload in bridgeless mode - #45486
[iOS] Fixes main thread stuck when reload in bridgeless mode#45486zhongwuzw wants to merge 3 commits into
Conversation
Base commit: fcd526d |
cipolleschi
left a comment
There was a problem hiding this comment.
Hi @zhongwuzw, thanks for the fix. I left a question/suggestion as the change is slightly different from the original code.
Uh oh!
There was an error while loading. Please reload this page.
facebook-github-bot
commented
Jul 18, 2024
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
cipolleschi
commented
Jul 19, 2024
Hi @zhongwuzw! A colleague suggested that we might just remove the callback. Given this todo, we should be able to just start the surface after it is created. Do you mind implementing the changes, please? |
zhongwuzw
commented
Jul 19, 2024
@cipolleschi Hi, do you mean we can call the start surface on |
cipolleschi
commented
Jul 23, 2024
Yes, probably yes! :D |
zhongwuzw
commented
Jul 23, 2024
@cipolleschi I changed to bufferedruntime. |
facebook-github-bot
commented
Jul 30, 2024
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
facebook-github-bot
commented
Aug 2, 2024
@cipolleschi merged this pull request in a778979. |
react-native-bot
commented
Aug 2, 2024
This pull request was successfully merged by @zhongwuzw in a778979 When will my fix make it into a release? | How to file a pick request? |
| for (RCTFabricSurface *surface in [self _getAttachedSurfaces]) { | ||
| [surface resetWithSurfacePresenter:self.surfacePresenter]; | ||
| [_instance callFunctionOnBufferedRumtimeExecutor:[surface](facebook::jsi::Runtime &_) { [surface start]; }]; |
There was a problem hiding this comment.
Just a small typo "rumtime"
There was a problem hiding this comment.
Thanks, good catch, I would fix it in my next PR. :)
Summary: I introduced a typo in #45486 . Thanks migueldaipre for the catch-up. cc cipolleschi ## Changelog: [IOS] [FIXED] - Fixes typo of function callFunctionOnBufferedRumtimeExecutor Pull Request resolved: #45902 Test Plan: Just a typo. Reviewed By: cipolleschi Differential Revision: D60775511 Pulled By: arushikesarwani94 fbshipit-source-id: da781ea5ecf2e0a15e5419430240e10194043b1b
Summary:
In fabric bridgeless mode, when we reload, main thread may block because of dead lock. the backtrace example as below:
Changelog:
[IOS] [FIXED] - Fixes main thread stuck when reload in bridgeless mode
Test Plan:
RNTester, enables fabric, which is very easy to repro by tapping
rcommand multiple times quickly to trigger reload.