react-native-quickjs
react-native-quickjs copied to clipboard
General question about threading
I've been playing with QuickJS for a while now but I'm not familiar with react native. I'm curious whether qjs is running in a thread capable of blocking the react native ui. I know from skimming that the rendered ui itself within its own thread, but where I'm not sure and curious is if calls from the ui are asynchronous in nature how are they are ultimately invoked within quickjs in an asynchronous manner.
I may be over thinking things, but I think I see that it comes down to how react-native/JSI handles multiple calls within QuickJS if the UI itself is asynchronous. I know chrome opens multiple rendering processes to handle V8 execution, and that each rendering process is capable of handling different V8 contexts in separate threads when in single process mode such as within a webview. will react-native open multiple qjs processes or will all execution be down to one thread of qjs?
One react-native instance owns one qjs thread. And multiple root views can be attached to one react-native instance.