Message365266
@Mouse: replace the last block of your code with something like this:
# Start worker processes
workers = []
for m in range(nProcesses):
p = mp.Process(target=getElements, args=(q, tSleep / 1000, m))
workers.append(p)
p.start()
# Wait for all workers to complete
for p in workers:
p.join()
But I don't think this tracker issue is the right place to have this conversation. It's highly unlikely that this change will be reverted - there are strong reasons to avoid fork on macOS, and the issue you're reporting isn't directly related to this one: it's an issue with using "spawn" on any OS.
However, there may be scope for improving the documentation so that fewer users fall into this trap. I'd suggest opening another issue for that, or continuing the conversation on #28965. |
|
Date |
User |
Action |
Args |
2020-03-29 16:08:15 | mark.dickinson | set | recipients:
+ mark.dickinson, barry, gregory.p.smith, ronaldoussoren, pitrou, vstinner, ned.deily, lukasz.langa, josh.r, tdsmith, davin, mouse07410, Ryan May, pablogsal, miss-islington, kapilt |
2020-03-29 16:08:15 | mark.dickinson | set | messageid: <1585498095.49.0.709878255733.issue33725@roundup.psfhosted.org> |
2020-03-29 16:08:15 | mark.dickinson | link | issue33725 messages |
2020-03-29 16:08:15 | mark.dickinson | create | |
|