1
0
mirror of https://github.com/golang/go synced 2024-11-17 20:54:48 -07:00

sync: clarify Cond.Wait documentation

The previous wording was unclear and seemingly contradictory.
This commit is contained in:
Isaiah Becker-Mayer 2022-06-23 10:15:09 -04:00 committed by Isaiah Becker-Mayer
parent 2e773a3894
commit c1e032fa94

View File

@ -53,7 +53,7 @@ func NewCond(l Locker) *Cond {
// Wait locks c.L before returning. Unlike in other systems,
// Wait cannot return unless awoken by Broadcast or Signal.
//
// Because c.L is not locked when Wait first resumes, the caller
// Because c.L is not locked while Wait is waiting, the caller
// typically cannot assume that the condition is true when
// Wait returns. Instead, the caller should Wait in a loop:
//