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

Fix #148 (UB in try_call_once) #149

Merged
merged 4 commits into from
Apr 3, 2023
Merged

Conversation

UnknownEclipse
Copy link
Contributor

This PR fixes issue #148 by retrying if the called-once function returns an error while another thread is also attempting to call a function.

@zesterer
Copy link
Collaborator

Thanks, this change looks correct to me (I also came to a similar conclusion after seeing your issue).

It looks like the MSRV check failed, so that will need fixing before merge.

It seems like this issue has been in the crate for a while and will require the yanking of 3 versions (0.9.3, 0.9.4, and 0.9.7). That's unfortunate, but isn't too bad.

@UnknownEclipse
Copy link
Contributor Author

Ok the MSRV issue should be fixed. I also cleaned up the impl to decrease nesting and remove some extra branching, but not sure if that's out of scope of this PR.

@zesterer
Copy link
Collaborator

zesterer commented Apr 3, 2023

Thanks, that's ideal!

@zesterer zesterer merged commit 2a018b6 into mvdnes:master Apr 3, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants