Tracking Issue for Mutex::unlock() · Issue #81872 · rust-lang/rust (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@mark-i-m

Description

@mark-i-m

Feature gate: #![feature(mutex_unlock)]

This is a tracking issue for the Mutex::unlock function. The goal of this function is to replace drop(mutex_guard) which doesn't clear express that a synchronization event is occurring.

Some earlier discussion, including a previous implementation: #79434 (comment)

Public API

// std::sync::Mutex

impl Mutex { /// Immediately drops the guard, unlocking the mutex. /// /// This is equivalent to drop(guard), but it is more self-documenting. pub fn unlock(guard: MutexGuard) { drop(guard); } }

Steps / History

Unresolved Questions