-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
The feature gate for the issue is #![feature(unwindsafe_condvar)]
.
This is a tracking issue for implementing core::panic::UnwindSafe
and core::panic::RefUnwindSafe
for std::sync::Condvar
.
Currently, UnwindSafe
and RefUnwindSafe
are only implemented for some targets (See #118009). It was suggested a PR could be submitted to fix this inconsistency. However, in looking at how Mutex
and RwLock
get their unwind safety, I decided the best course of action would be to add the impl right next to those similar implementations:
Lines 66 to 74 in 9afdb8d
#[stable(feature = "catch_unwind", since = "1.9.0")] | |
impl<T: ?Sized> UnwindSafe for Mutex<T> {} | |
#[stable(feature = "catch_unwind", since = "1.9.0")] | |
impl<T: ?Sized> UnwindSafe for RwLock<T> {} | |
#[stable(feature = "unwind_safe_lock_refs", since = "1.12.0")] | |
impl<T: ?Sized> RefUnwindSafe for Mutex<T> {} | |
#[stable(feature = "unwind_safe_lock_refs", since = "1.12.0")] | |
impl<T: ?Sized> RefUnwindSafe for RwLock<T> {} |
By adding the implementation this way, my understanding is that the first step is submitting this tracking issue because impls are insta-stable.
Steps
- Add the two implementations
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Are the implementations on all targets unwind safe? I'm the original reporter of the issue, and was encouraged to submit a PR, but I don't actually know if all of the implementations are actually unwind safe.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.