-
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.disposition-closeThis PR / issue is in PFCP or FCP with a disposition to close it.This PR / issue is in PFCP or FCP with a disposition to close it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
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<T> Mutex<T> {
/// Immediately drops the guard, unlocking the mutex.
///
/// This is equivalent to `drop(guard)`, but it is more self-documenting.
pub fn unlock(guard: MutexGuard<T>) {
drop(guard);
}
}
Steps / History
- Implementation: Add Mutex::unlock #81873
- Final commenting period (FCP)
- Stabilization PR
Unresolved Questions
- Should an analogous function be added to
RwLock
? It would be a bit more complicated.
hellow554, steffahn, ChayimFriedman2, mejrs, Bromeon and 3 more
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.disposition-closeThis PR / issue is in PFCP or FCP with a disposition to close it.This PR / issue is in PFCP or FCP with a disposition to close it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.