You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed ReactInstanceManager methods have @ThreadConfined(UI) and has assertions around same. Wanted to understand why do we need to initialize this on main thread?
Why SoLoader needs to be initialized on main thread?
while in the issue body you point to runCreateReactContextOnNewThread. I'm unsure what you'r exactly asking.
Kshitij09-sc
changed the title
[Question] Why SoLoader needs to be initialized on main thread?
[Question] Why ReactInstanceManager needs to be initialized on main thread?
May 23, 2024
Let's focus this question on ReactInstanceManager. I noticed SoLoader & these classes are somehow linked when it comes to initialization, but to keep it specific, why ReactInstanceManager needs to be initialized on main thread?
Introduction
I noticed
ReactInstanceManager
methods have@ThreadConfined(UI)
and has assertions around same. Wanted to understand why do we need to initialize this on main thread?Details
https://github.com/facebook/react-native/blob/d94c4c46f27139d68d5303d0dafe106c4c685ea6/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java#L1117
Discussion points
The text was updated successfully, but these errors were encountered: