Skip to content

Tracking Issue for arc_is_unique #138938

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

Open
1 of 4 tasks
SabrinaJewson opened this issue Mar 25, 2025 · 1 comment
Open
1 of 4 tasks

Tracking Issue for arc_is_unique #138938

SabrinaJewson opened this issue Mar 25, 2025 · 1 comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@SabrinaJewson
Copy link
Contributor

SabrinaJewson commented Mar 25, 2025

Feature gate: #![feature(arc_is_unique)]

This is a tracking issue for Arc::is_unique, a function that allows determining whether there is exactly one strong count and zero weak counts to an Arc.

Public API

// alloc::sync

impl<T> Arc<T> {
    pub fn is_unique(this: &Self) -> bool;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

@SabrinaJewson SabrinaJewson added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Mar 25, 2025
@tgross35
Copy link
Contributor

IMO we should also have this method on Rc. It isn't needed for the same synchronization reasons, but it would be nice for consistency and convenience.

ChrisDenton added a commit to ChrisDenton/rust that referenced this issue Apr 28, 2025
…oss35

Add `Arc::is_unique`

Adds

```rs
impl<T> Arc<T> {
    pub fn is_unique(this: &Self) -> bool;
}
```

Tracking issue: rust-lang#138938
ACP: rust-lang/libs-team#560
ChrisDenton added a commit to ChrisDenton/rust that referenced this issue Apr 28, 2025
…oss35

Add `Arc::is_unique`

Adds

```rs
impl<T> Arc<T> {
    pub fn is_unique(this: &Self) -> bool;
}
```

Tracking issue: rust-lang#138938
ACP: rust-lang/libs-team#560
ChrisDenton added a commit to ChrisDenton/rust that referenced this issue Apr 28, 2025
…oss35

Add `Arc::is_unique`

Adds

```rs
impl<T> Arc<T> {
    pub fn is_unique(this: &Self) -> bool;
}
```

Tracking issue: rust-lang#138938
ACP: rust-lang/libs-team#560
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 28, 2025
Rollup merge of rust-lang#138939 - SabrinaJewson:arc-is-unique, r=tgross35

Add `Arc::is_unique`

Adds

```rs
impl<T> Arc<T> {
    pub fn is_unique(this: &Self) -> bool;
}
```

Tracking issue: rust-lang#138938
ACP: rust-lang/libs-team#560
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants