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.

Author Olivier.Grisel
Recipients Olivier.Grisel, pablogsal, pierreglaser, pitrou, vstinner, xtreak
Date 2019-05-13.12:50:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557751835.55.0.780755595425.issue36867@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2019-05-13 12:50:35Olivier.Griselsetrecipients: + Olivier.Grisel, pitrou, vstinner, pablogsal, xtreak, pierreglaser
2019-05-13 12:50:35Olivier.Griselsetmessageid: <1557751835.55.0.780755595425.issue36867@roundup.psfhosted.org>
2019-05-13 12:50:35Olivier.Grisellinkissue36867 messages
2019-05-13 12:50:35Olivier.Griselcreate