You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2019/04/10 07:19:04 UTC

[incubator-weex] branch master updated: Throw exception if create pthread failed (#2300)

This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new f3f08b6  Throw exception if create pthread failed (#2300)
f3f08b6 is described below

commit f3f08b64272d31eb8d03a663a20b9cedc4f482b2
Author: darin <dy...@qq.com>
AuthorDate: Wed Apr 10 15:18:59 2019 +0800

    Throw exception if create pthread failed (#2300)
---
 weex_core/Source/android/multiprocess/weex_js_connection.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/weex_core/Source/android/multiprocess/weex_js_connection.cpp b/weex_core/Source/android/multiprocess/weex_js_connection.cpp
index 97d7771..251bc02 100644
--- a/weex_core/Source/android/multiprocess/weex_js_connection.cpp
+++ b/weex_core/Source/android/multiprocess/weex_js_connection.cpp
@@ -218,6 +218,10 @@ IPCSender *WeexJSConnection::start(IPCHandler *handler, IPCHandler *serverHandle
   pthread_attr_init(&threadAttr);
   pthread_t ipcServerThread;
   int i = pthread_create(&ipcServerThread, &threadAttr, newIPCServer, &td);
+  if(i != 0) {
+    throw IPCException("failed to create ipc server thread");
+  }
+
   while (newThreadStatus == UNFINISH) {
     continue;
   }