You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2019/08/14 08:45:00 UTC

[GitHub] [incubator-weex] Darin726 commented on a change in pull request #2824: [Android] Android] restart weexCoreThread when reload JSEngine becaus…

Darin726 commented on a change in pull request #2824: [Android] Android] restart weexCoreThread when reload JSEngine becaus…
URL: https://github.com/apache/incubator-weex/pull/2824#discussion_r313764346
 
 

 ##########
 File path: android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
 ##########
 @@ -867,6 +867,14 @@ public int callRefreshFinish(String instanceId, String callback) {
 
   }
 
+  public void restartWeexCoreThread(){
+      WXLogUtils.e("weex","restartWeexCoreThread");
+      WXThread oldThread = mJSThread;
+      mJSThread = new WXThread("WeexJSBridgeThread", this);
+      mJSHandler = mJSThread.getHandler();
+      oldThread.quit();
 
 Review comment:
   程序还在运行, 直接 quit 有风险吗? 有发过灰度吗

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services