Tracking Issue for {Mutex, RwLock}::data_ptr · Issue #140368 · rust-lang/rust (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@jplatte

Description

@jplatte

Feature gate: #![feature(mutex_data_ptr)], #![feature(rwlock_data_ptr)]

This is a tracking issue for allowing unguarded access to the inner value of a Mutex or RwLock. Previous discussion here: rust-lang/libs-team#531

Public API

// std::sync

impl<T: ?Sized> Mutex { pub fn data_ptr(&self) -> *mut T; }

impl<T: ?Sized> RwLock { pub fn data_ptr(&self) -> *mut T; }

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

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