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:
|
#[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
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.
The feature gate for the issue is
#![feature(unwindsafe_condvar)].This is a tracking issue for implementing
core::panic::UnwindSafeandcore::panic::RefUnwindSafeforstd::sync::Condvar.Currently,
UnwindSafeandRefUnwindSafeare only implemented for some targets (See #118009). It was suggested a PR could be submitted to fix this inconsistency. However, in looking at howMutexandRwLockget their unwind safety, I decided the best course of action would be to add the impl right next to those similar implementations:rust/library/std/src/panic.rs
Lines 66 to 74 in 9afdb8d
By adding the implementation this way, my understanding is that the first step is submitting this tracking issue because impls are insta-stable.
Steps
Unresolved Questions