1

I would like to start multiprocessing with infinite loop in one python file and then in other file would say if process is running by name and stoping it if running. I have played with examples in web, but have not found how to target running multiprocess by name.

When I created process it showed Python as it's name not the name I adde to it, I can not target it with pid, because it is changing. What can I do?

I know what difference is Processes and Threads but do not know which one is better in this case. When I tried with threads, but enumarate() did not show specific threat and when I added to same code, what created it "Thread-1" showed not the name I added.

user3748173
  • 215
  • 2
  • 9
  • You can keep the spawned thread in the dictionary, with the name as a key. Then you will always have easy access to the specific thread. – K. Kirsz Jul 11 '17 at 10:16
  • Let me see if I understood you correctly - you want to run multiple sub-processes in one Python process, and you want to stop individual sub-processes in that process from a completely separate Python process? – zwer Jul 11 '17 at 10:27

0 Answers0