Open Kshitij09-sc opened 5 months ago
Can you elaborate more?
Specifically in your title you ask:
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.
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