Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround approximate use_count in std::shared_ptr #1032

Merged
merged 3 commits into from
Nov 2, 2017

Conversation

gittyupagain
Copy link
Contributor

According to the C++ documentation on std::shared_ptr::use_count() function, the value returned is approximate in a multithreaded environment. Some tests are expecting an exact count, so adjust tests to allow the count to become correct within a specified amount of time.

According to the C++ documentation on std::shared_ptr::use_count()
function, the value returned is approximate in a multithreaded
environment. Some tests are expecting an exact count, so adjust tests to
allow the count to become "correct" within a specified amount of time.
Copy link
Contributor

@jdonald jdonald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good after the last two updates.

Still looking at outstanding failures in VerifyImmediateThreadCleanup and SimultaneousMultiInject, but not clear that those are related to .unique()/.use_count()

@jdonald jdonald merged commit 8e0a804 into master Nov 2, 2017
@jdonald jdonald deleted the fix-approx-use_count branch November 2, 2017 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants