This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 mark.dickinson
收信人 Ryan May, barry, davin, gregory.p.smith, josh.r, kapilt, lukasz.langa, mark.dickinson, miss-islington, mouse07410, ned.deily, pablogsal, pitrou, ronaldoussoren, tdsmith, vstinner
日期 2020-03-29.16:08:15
SpamBayes Score -1.0
Marked as misclassified
Message-id <1585498095.49.0.709878255733.issue33725@roundup.psfhosted.org>
In-reply-to
内容
@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.
历史
日期 用户 动作 参数
2020-03-29 16:08:15mark.dickinson修改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:15mark.dickinson修改messageid: <1585498095.49.0.709878255733.issue33725@roundup.psfhosted.org>
2020-03-29 16:08:15mark.dickinson链接issue33725 messages
2020-03-29 16:08:15mark.dickinson创建