I have failed to replicate the issue after several attempts with your code and the code from the first example, found on the page you've linked to. The code runs smoothly, stops completely after running the code and this is returned to me:
CPU Time: 0.09 sec(s), Memory: 14548 kilobyte(s)
Worker processes within a Pool will live for the complete duration of the Pool’s work queue. Hence the difficulty and queue of your code are next to nothing, the processes should kill themselves within seconds.
As you are news to Multiprocessing, I'll just repeat the basic methods used, which are:
- Start() starts the process's activity.
- Join() waits for the workers' processes to exit.
- Close() will prevent any more tasks from being submitted to the pool and exit once all tasks complete.
- Terminate() will just exit by stopping all worker processes immediately.
When one is not working with a Pool, one must always call close() or terminate() before using join(), but that is not relevant for your question. I simply can't see how or why your program shouldn't stop running. I will, however, suggest trying another compiler - maybe even another online compiler like jdoodle.com to see what kind of result it returns when you execute your code.
Edit: Hence the fact, that there is an edge at the bottom of the box on your picture, I'd say that the process has finished. How do you know, that your code won't stop running?