-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
std: Doc blocking behavior of LazyLock #119870
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cuviper (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
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.
Content LGTM, but could you add a blurb about this at the top-level LazyLock
type? I don't think many users will read all the way down the deref
.
Good point, @tgross35. I'll do that. I also noticed |
Also cc @SUPERCILEX. |
I don't think that can happen for |
Uh, you're right, @tgross35. No other self-consuming methods have any note on blocking behavior. I'll leave |
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.
LGTM with the optional nit. I can't approve workflows so somebody else will have to take a look too.
Thanks for the PR, docs improvements are always appreciated! Welcome 🙂
This looks great, thanks! Could you squish your commits into one? |
d0b97ab
to
2e8173b
Compare
Cool! Sure, just did. |
2e8173b
to
a596159
Compare
@bors r=tgross35,ChrisDenton rollup |
…-1, r=tgross35,ChrisDenton std: Doc blocking behavior of LazyLock Adding notes about blocking behavior of calls that can block the current thread, similar to those on https://doc.rust-lang.org/std/sync/struct.OnceLock.html I'm not sure if the "This method never blocks." counterparts would be desired. If so, can add those, as well.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#119508 (coverage: Simplify building the coverage graph with `CoverageSuccessors`) - rust-lang#119818 (Silence some follow-up errors [3/x]) - rust-lang#119870 (std: Doc blocking behavior of LazyLock) - rust-lang#119963 (Fix `allow_internal_unstable` for `(min_)specialization`) - rust-lang#119968 (Remove unused/unnecessary features) - rust-lang#119971 (Use `zip_eq` to enforce that things being zipped have equal sizes) - rust-lang#119974 (Minor `trimmed_def_paths` improvements) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#119818 (Silence some follow-up errors [3/x]) - rust-lang#119870 (std: Doc blocking behavior of LazyLock) - rust-lang#119897 (`OutputTypeParameterMismatch` -> `SignatureMismatch`) - rust-lang#119963 (Fix `allow_internal_unstable` for `(min_)specialization`) - rust-lang#119971 (Use `zip_eq` to enforce that things being zipped have equal sizes) - rust-lang#119974 (Minor `trimmed_def_paths` improvements) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#119818 (Silence some follow-up errors [3/x]) - rust-lang#119870 (std: Doc blocking behavior of LazyLock) - rust-lang#119897 (`OutputTypeParameterMismatch` -> `SignatureMismatch`) - rust-lang#119963 (Fix `allow_internal_unstable` for `(min_)specialization`) - rust-lang#119971 (Use `zip_eq` to enforce that things being zipped have equal sizes) - rust-lang#119974 (Minor `trimmed_def_paths` improvements) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#119818 (Silence some follow-up errors [3/x]) - rust-lang#119870 (std: Doc blocking behavior of LazyLock) - rust-lang#119897 (`OutputTypeParameterMismatch` -> `SignatureMismatch`) - rust-lang#119963 (Fix `allow_internal_unstable` for `(min_)specialization`) - rust-lang#119971 (Use `zip_eq` to enforce that things being zipped have equal sizes) - rust-lang#119974 (Minor `trimmed_def_paths` improvements) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119870 - behnam-oneschema:lazylock-blocking-1, r=tgross35,ChrisDenton std: Doc blocking behavior of LazyLock Adding notes about blocking behavior of calls that can block the current thread, similar to those on https://doc.rust-lang.org/std/sync/struct.OnceLock.html I'm not sure if the "This method never blocks." counterparts would be desired. If so, can add those, as well.
Adding notes about blocking behavior of calls that can block the current thread, similar to those on https://doc.rust-lang.org/std/sync/struct.OnceLock.html
I'm not sure if the "This method never blocks." counterparts would be desired. If so, can add those, as well.