You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/07/17 22:34:28 UTC

[GitHub] [incubator-mxnet] apeforest commented on a change in pull request #15574: fix naive engine for multi-threaded inference

apeforest commented on a change in pull request #15574: fix naive engine for multi-threaded inference
URL: https://github.com/apache/incubator-mxnet/pull/15574#discussion_r304669941
 
 

 ##########
 File path: src/engine/naive_engine.cc
 ##########
 @@ -238,7 +238,11 @@ class NaiveEngine final : public Engine {
     static_cast<NaiveEngine*>(engine)->req_completed_ = true;
   }
   // whether action is completed
-  bool req_completed_;
+#if DMLC_CXX11_THREAD_LOCAL
+  static thread_local bool req_completed_;
 
 Review comment:
   According to C++ standards, thread_local implies static.
   https://stackoverflow.com/questions/22794382/are-c11-thread-local-variables-automatically-static
   

----------------------------------------------------------------
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