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

Stabilize Once::is_completed #68945

Merged
merged 1 commit into from Feb 20, 2020
Merged

Stabilize Once::is_completed #68945

merged 1 commit into from Feb 20, 2020

Conversation

@mjbshaw
Copy link
Contributor

mjbshaw commented Feb 8, 2020

Closes #54890

This function has been around for some time. I haven't seen anyone raise any objections to it. I've personally found it useful myself. It would be nice to finally stabilize it and

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 8, 2020

r? @LukasKalbertodt

(rust_highfive has picked a reviewer for you, use r? to override)

Copy link
Member

LukasKalbertodt left a comment

The changes look good to me.

@rfcbot fcp merge (@rust-lang/libs can someone do this for me? I am not allowed to)


What is stabilized here? std::sync::Once::is_completed:

pub fn is_completed(&self) -> bool

Implemented 1.5 years ago. The tracking issue did not bring up any concerns, so I think this is a pretty straight forward addition and I don't see why it shouldn't be stabilized.

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Feb 8, 2020

The PR originally implementing this also mentioned that doing anything meaningful when the method returns false is likely wrong; do we want to add that to the docs prior to stabilization?

@jonas-schievink jonas-schievink added this to the 1.43 milestone Feb 8, 2020
@mjbshaw

This comment has been minimized.

Copy link
Contributor Author

mjbshaw commented Feb 8, 2020

@Mark-Simulacrum I incorporated @nagisa's wording in an attempt to make that clearer. I'm hoping the updated verbiage is sufficient. I'm reluctant to explicitly say "don't do anything meaningful if this returns false" because I think that can be easily misunderstood to mean that the else branch in if once.is_completed() { ... } else { ... } is bad, when in reality it can be perfectly reasonable (i.e., 1, 2).

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Feb 8, 2020

Yes that seems better.

@Amanieu

This comment has been minimized.

Copy link
Contributor

Amanieu commented Feb 9, 2020

@rfcbot fcp merge

@rfcbot

This comment has been minimized.

Copy link

rfcbot commented Feb 9, 2020

Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@LukasKalbertodt

This comment was marked as resolved.

Copy link
Member

LukasKalbertodt commented Feb 9, 2020

@mjbshaw Have you forgot to push or am I misunderstanding your last comment?

@mjbshaw

This comment was marked as resolved.

Copy link
Contributor Author

mjbshaw commented Feb 9, 2020

@LukasKalbertodt I don't have any new changes or anything new to push. Were there specific changes you were looking for?

@LukasKalbertodt

This comment was marked as resolved.

Copy link
Member

LukasKalbertodt commented Feb 9, 2020

@mjbshaw I thought this comment of yours implied you did some changes to the documentation. But nevermind, my mistake :)

@rfcbot

This comment has been minimized.

Copy link

rfcbot commented Feb 9, 2020

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot

This comment has been minimized.

Copy link

rfcbot commented Feb 19, 2020

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@LukasKalbertodt

This comment has been minimized.

Copy link
Member

LukasKalbertodt commented Feb 20, 2020

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 20, 2020

📌 Commit 348278a has been approved by LukasKalbertodt

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Feb 20, 2020
…albertodt

Stabilize Once::is_completed

Closes rust-lang#54890

This function has been around for some time. I haven't seen anyone raise any objections to it. I've personally found it useful myself. It would be nice to finally stabilize it and
bors added a commit that referenced this pull request Feb 20, 2020
Rollup of 5 pull requests

Successful merges:

 - #68705 (Add LinkedList::remove())
 - #68945 (Stabilize Once::is_completed)
 - #68978 (Make integer exponentiation methods unstably const)
 - #69266 (Fix race condition when allocating source files in SourceMap)
 - #69287 (Clean up E0317 explanation)

Failed merges:

r? @ghost
@bors bors merged commit 588f008 into rust-lang:master Feb 20, 2020
4 checks passed
4 checks passed
pr Build #20200208.13 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

8 participants
You can’t perform that action at this time.