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

Add GILOnceCell::get_or_try_init #2398

Merged
merged 2 commits into from
Dec 26, 2022
Merged

Add GILOnceCell::get_or_try_init #2398

merged 2 commits into from
Dec 26, 2022

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented May 24, 2022

This is similar to OnceCell::get_or_try_init and is very useful for fallible initialization.

Copy link
Member

@mejrs mejrs left a 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

src/once_cell.rs Outdated Show resolved Hide resolved
Copy link
Member

@davidhewitt davidhewitt left a 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.

@davidhewitt
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 26, 2022

👎 Rejected by code reviews

@davidhewitt davidhewitt requested a review from mejrs December 26, 2022 20:40
@davidhewitt
Copy link
Member

davidhewitt commented Dec 26, 2022

Hmmm, looks like bors probably wants you to give a green tick please @mejrs 😄

Copy link
Member

@mejrs mejrs left a comment

Choose a reason for hiding this comment

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

Thanks!

@mejrs
Copy link
Member

mejrs commented Dec 26, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 26, 2022

Build succeeded:

@bors bors bot merged commit 75ca1b2 into PyO3:main Dec 26, 2022
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.

4 participants