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 2018/05/15 06:56:35 UTC

[GitHub] HorsonLiu opened a new issue #10948: stuck subprocess in multithread

HorsonLiu opened a new issue #10948: stuck subprocess in multithread
URL: https://github.com/apache/incubator-mxnet/issues/10948
 
 
   `import multiprocessing.dummy as multiprocess
   import subprocess
   import mxnet as mx
   
   
   def handle_task():
       ctx = mx.cpu()
   
       for _ in xrange(500):
           print('g')
           mx.nd.ones((2, 3), ctx)
           # stuck here
           subprocess.check_output(["ls"])
           print('d')
   
   
   child_processes = [multiprocess.Process(target=handle_task, args=()) for _ in xrange(4)]
   
   for i in xrange(4):
       child_processes[i].start()
   
   for i in xrange(4):
       child_processes[i].join()`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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