Message365266
| Author |
mark.dickinson |
| Recipients |
Ryan May, barry, davin, gregory.p.smith, josh.r, kapilt, lukasz.langa, mark.dickinson, miss-islington, mouse07410, ned.deily, pablogsal, pitrou, ronaldoussoren, tdsmith, vstinner |
| Date |
2020年03月29日.16:08:15 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1585498095.49.0.709878255733.issue33725@roundup.psfhosted.org> |
| In-reply-to |
| Content |
@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. |
|
History
|
|---|
| 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 |
|