Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[Android] Android] restart weexCoreThread when reload JSEngine becaus… #2824

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

lucky-chen
Copy link
Contributor

[Android] Android] restart weexCoreThread when reload JSEngine because thread maybe in lock state and can't execute reload action (block)

…e thread maybe in lock state and can't execute reload action (block)
@weex-bot
Copy link

Warnings
⚠️ No Changelog changes! - Can you add a Changelog? To do so,append your changes to the changelog.md
⚠️ Current pr not bind the milestone
⚠️ If your PR is about fixing a bug excluding crash the code,you should add the demo link in the PR description. Demo link: http://dotwe.org/vue
Messages
📖 danger test finished.

Generated by 🚫 dangerJS against a72e753

Copy link
Contributor

@Darin726 Darin726 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oldThread.quit(); 有风险吗

WXThread oldThread = mJSThread;
mJSThread = new WXThread("WeexJSBridgeThread", this);
mJSHandler = mJSThread.getHandler();
oldThread.quit();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

程序还在运行, 直接 quit 有风险吗? 有发过灰度吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. HanderThread quit是比较安全的,remove 消息队列里面的所有消息,然后thread没有消息,loop结束,线程自然回收
  2. 灰度同步进行

Copy link
Contributor

@Darin726 Darin726 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Darin726 Darin726 merged commit c72e6b5 into apache:master Aug 14, 2019
lucky-chen added a commit to lucky-chen/incubator-weex that referenced this pull request Aug 15, 2019
…e because thread maybe in lock state and can't execute reload action (block) (apache#2824)"

This reverts commit c72e6b5.
Darin726 pushed a commit that referenced this pull request Aug 15, 2019
…e because thread maybe in lock state and can't execute reload action (block) (#2824)" (#2829)

This reverts commit c72e6b5.
lucky-chen added a commit that referenced this pull request Aug 26, 2019
…e because thread maybe in lock state and can't execute reload action (block) (#2824)"

This reverts commit c72e6b5.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants