Skip to content

Tracking Issue for impl UnwindSafe/RefUnwindSafe for Condvar #121690

Description

@ecton

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

  • 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions