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/03/17 16:52:34 UTC

[GitHub] [incubator-mxnet] arcadiaphy commented on a change in pull request #14451: fix custom operation in fork

arcadiaphy commented on a change in pull request #14451: fix custom operation in fork
URL: https://github.com/apache/incubator-mxnet/pull/14451#discussion_r266248347
 
 

 ##########
 File path: src/initialize.cc
 ##########
 @@ -53,11 +54,14 @@ class LibraryInitializer {
 
 // disable openmp for multithreaded workers
 #ifndef _WIN32
+    using op::custom::CustomOperator;
     pthread_atfork(
       []() {
+        CustomOperator::Get()->Stop();
         Engine::Get()->Stop();
 
 Review comment:
   The second option doesn't work either. When it goes into Stop function, the custom worker thread has already frozen on python function, leading to the blocking of worker join. I cannot think of a simple and graceful way to complete the unfinished custom operation other than manually add waiting command in the code.

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