3 ms·
As someone learning python (on mostly windows, but I test on ubuntu now and then to see if it works well) my advice is to just learn the multiprocessing version
by hoka 14y ago
As someone learning python (on mostly windows, but I test on ubuntu now and then to see if it works well) my advice is to just learn the multiprocessing version as shown by hythloday.
I had a lot of problems with threads not exiting/joining properly, and even my multiprocessing code was goofy on windows. I used the "poison pill" method at http://www.doughellmann.com/PyMOTW/multiprocessing/communication.html#multiprocessing-queues http://www.doughellmann.com/PyMOTW/multiprocessing/communica... and everything works on ubuntu.
I'm aware of the __main__ thing for windows, but I don't think that's my problem :-/