mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-05 17:30:38 +08:00
Reduce possible race condition on gc of catalyst instance
Reviewed By: cwdick Differential Revision: D5669579 fbshipit-source-id: 165e19b68199e89bb99f7f93f2b1ec70729b2848
This commit is contained in:
committed by
Facebook Github Bot
parent
5cdf5f3910
commit
f0d98104ae
@@ -329,6 +329,7 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
quitQueuesSynchronous();
|
||||
mHybridData.resetNative();
|
||||
// Kill non-UI threads from UI thread.
|
||||
getReactQueueConfiguration().destroy();
|
||||
@@ -342,6 +343,8 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
Systrace.unregisterListener(mTraceListener);
|
||||
}
|
||||
|
||||
private native void quitQueuesSynchronous();
|
||||
|
||||
@Override
|
||||
public boolean isDestroyed() {
|
||||
return mDestroyed;
|
||||
|
||||
Reference in New Issue
Block a user