Skip to content

Commit 81dff3b

Browse files
Abseil Teamcopybara-github
authored andcommitted
Move comment specific to pointer-taking MutexLock variant to its definition.
PiperOrigin-RevId: 791367956 Change-Id: I85d1f0962886a5b24651930122fd152b4cb66f30
1 parent 6a91068 commit 81dff3b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

absl/synchronization/mutex.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,13 @@ class ABSL_SCOPED_LOCKABLE MutexLock {
607607
this->mu_.lock();
608608
}
609609

610+
// Calls `mu->lock()` and returns when that call returns. That is, `*mu` is
611+
// guaranteed to be locked when this object is constructed. Requires that
612+
// `mu` be dereferenceable.
610613
explicit MutexLock(Mutex* absl_nonnull mu) ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
611614
: MutexLock(*mu) {}
612615

613-
// Like above, but calls `mu->LockWhen(cond)` instead. That is, in addition to
616+
// Like above, but calls `mu.LockWhen(cond)` instead. That is, in addition to
614617
// the above, the condition given by `cond` is also guaranteed to hold when
615618
// this object is constructed.
616619
explicit MutexLock(Mutex& mu ABSL_INTERNAL_ATTRIBUTE_CAPTURED_BY(this),

0 commit comments

Comments
 (0)