-
Notifications
You must be signed in to change notification settings - Fork 782
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
Add GILOnceCell::get_or_try_init
#2398
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some tests 😉 Otherwise it looks good to me
93ed391
to
79501bc
Compare
79501bc
to
a47079d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for this, and sorry for the slow review. I agree with all comments above; I've just pushed a commit to move the docs around as suggested and will merge this now.
bors r+ |
👎 Rejected by code reviews |
Hmmm, looks like bors probably wants you to give a green tick please @mejrs 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
bors r+ |
Build succeeded: |
This is similar to
OnceCell::get_or_try_init
and is very useful for fallible initialization.