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

Tracking Issue for sync_poison #134646

Open
1 of 4 tasks
tgross35 opened this issue Dec 22, 2024 · 1 comment
Open
1 of 4 tasks

Tracking Issue for sync_poison #134646

tgross35 opened this issue Dec 22, 2024 · 1 comment
Assignees
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@tgross35
Copy link
Contributor

tgross35 commented Dec 22, 2024

Feature gate: #![feature(sync_poison)]

This is a tracking issue moving all poisonable std::sync types to std::sync::poison, with reexports in std::sync. In a future edition, we will be able to instead reexport std::sync::nonpoison (this module does not exist yet).

Public API

// std::sync::poison

type LockResult;
type TryLockResult;

struct Condvar { /* ... */ };
struct Mutex<T: ?Sized> { /* ... */ };
struct MutexGuard { /* ... */ };
struct Once { /* ... */ };
struct OnceState { /* ... */ };
struct PoisonError { /* ... */ };
struct RwLock { /* ... */ };
struct RwLockReadGuard { /* ... */ };
struct RwLockWriteGuard { /* ... */ };

enum TryLockError { /* ... */ };

// Unstable types
pub struct MappedMutexGuard<'a, T: ?Sized + 'a> { /* ... */ }
pub struct MappedRwLockReadGuard<'a, T: ?Sized + 'a> { /* ... */ }
pub struct MappedRwLockWriteGuard<'a, T: ?Sized + 'a> { /* ... */ }
// std::sync

// This module will be gated behind `sync_poison`
pub mod poison;

pub use poision::*;

Steps / History

Unresolved Questions

  • None yet.

Related

Footnotes

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

@tgross35 tgross35 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. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. labels Dec 22, 2024
@GrigorenkoPV
Copy link
Contributor

GrigorenkoPV commented Dec 23, 2024

sync_poison feature gate had already been used for some 1.2-stabilized APIs, which seems to have introduced poisoning in the first place.

I propose using sync_poison_mod or something similar.

Also,
@rustbot claim

bors added a commit to rust-lang-ci/rust that referenced this issue Jan 1, 2025
Move some things to `std::sync::poison` and reexport them in `std::sync`

Tracking issue: rust-lang#134646

r? `@tgross35`

I've used `sync_poison_mod` feature flag instead, because `sync_poison` had already been used back in 1.2.
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
Move some things to `std::sync::poison` and reexport them in `std::sync`

Tracking issue: rust-lang#134646

r? `@tgross35`

I've used `sync_poison_mod` feature flag instead, because `sync_poison` had already been used back in 1.2.
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 3, 2025
Move some things to `std::sync::poison` and reexport them in `std::sync`

Tracking issue: rust-lang#134646

r? `@tgross35`

I've used `sync_poison_mod` feature flag instead, because `sync_poison` had already been used back in 1.2.

try-job: x86_64-msvc
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 E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. 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