➜

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.

作者 Olivier.Grisel
收信人 Olivier.Grisel, pablogsal, pierreglaser, pitrou, vstinner, xtreak
日期 2019-05-13.12:50:35
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1557751835.55.0.780755595425.issue36867@roundup.psfhosted.org>
In-reply-to
内容
As Victor said, the `time.sleep(1.0)` might lead to Heisen failures. I am not sure how to write proper strong synchronization in this case but we could instead go for something intermediate such as the following pattern:


        ...
        p.terminate()
        p.wait()
        for i in range(60):
            try:
                shared_memory.SharedMemory(name, create=False)
            except FileNotFoundError:
                # the OS successfully collected the segment as expected
                break

            time.sleep(1.0)  # wait for the OS to collect the segment

         else:
             raise AssertionError(f"Failed to collect shared_memory segment {name}")


What do you think?
历史
日期 用户 动作 参数
2019-05-13 12:50:35Olivier.Grisel修改recipients: + Olivier.Grisel, pitrou, vstinner, pablogsal, xtreak, pierreglaser
2019-05-13 12:50:35Olivier.Grisel修改messageid: <1557751835.55.0.780755595425.issue36867@roundup.psfhosted.org>
2019-05-13 12:50:35Olivier.Grisel链接issue36867 messages
2019-05-13 12:50:35Olivier.Grisel创建