提交 02a9c3fd 编写于 作者: B barrierye

comment the warning in stub_imp.hpp

上级 a6f08b2a
......@@ -119,7 +119,7 @@ int PredictorClient::create_predictor_by_desc(const std::string &sdk_desc) {
LOG(ERROR) << "Predictor Creation Failed";
return -1;
}
_api.thrd_initialize();
// _api.thrd_initialize();
return 0;
}
......@@ -130,7 +130,7 @@ int PredictorClient::create_predictor() {
LOG(ERROR) << "Predictor Creation Failed";
return -1;
}
_api.thrd_initialize();
// _api.thrd_initialize();
return 0;
}
......@@ -152,6 +152,7 @@ int PredictorClient::batch_predict(
int fetch_name_num = fetch_name.size();
_api.thrd_initialize();
std::string variant_tag;
_predictor = _api.fetch_predictor("general_model", &variant_tag);
predict_res_batch.set_variant_tag(variant_tag);
......
......@@ -133,7 +133,10 @@ int StubImpl<T, C, R, I, O>::initialize(const VariantInfo& var,
template <typename T, typename C, typename R, typename I, typename O>
int StubImpl<T, C, R, I, O>::thrd_initialize() {
if (THREAD_GETSPECIFIC(_bthread_key) != NULL) {
LOG(WARNING) << "Already thread initialized for stub";
// Because gPRC is uesd, this function may be called
// multiple times, so the warning will be commented out
// temporarily. See PR:#483 and PR:#500 for details.
// LOG(WARNING) << "Already thread initialized for stub";
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册