classner / pymp

Easy, OpenMP style multiprocessing for Python on Unix.
MIT License
280 stars 29 forks source link

Ctrl + C stopping does not work #6

Closed zhangmozhe closed 5 years ago

zhangmozhe commented 6 years ago

The work is really nice. The problem is how to stop the code during running. It seems that Ctrl+C does not work and the processes cannot be stopped.

classner commented 5 years ago

Hi @zhangmozhe ,

this is due to the multi-threading and an inherent problem that's not (easily) solvable. You an try Ctrl+\, but some processes may continue to run. You can always use if_=False for debugging to finalize your code and then only remove that for deployment to minimize the hassle with this.