提交 16a8f591 编写于 作者: W wangguibao

Fix dead-lock condition with PaddlePaddle GPU Predictor

上级 4d8bdb2a
......@@ -69,7 +69,15 @@ DEFINE_bool(V, false, "print version, bool");
DEFINE_bool(g, false, "user defined gflag path");
DECLARE_string(flagfile);
void pthread_worker_start_fn() { Resource::instance().thread_initialize(); }
namespace bthread {
extern pthread_mutex_t g_task_control_mutex;
}
void pthread_worker_start_fn() {
while (pthread_mutex_lock(&bthread::g_task_control_mutex) != 0) {}
Resource::instance().thread_initialize();
pthread_mutex_unlock(&bthread::g_task_control_mutex);
}
static void g_change_server_port() {
InferServiceConf conf;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册