From: Wèi Cōngruì Date: Mon, 11 Dec 2017 03:17:34 +0000 (+0800) Subject: internal/poll: fix error in increfAndClose documentation X-Git-Tag: go1.10beta2~142 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8c227765f70b5677901692a71d8662f395186a83;p=gostls13.git internal/poll: fix error in increfAndClose documentation Change-Id: I0c387b6286bc18fd00c6ac4e42bdf175cf89ccb1 Reviewed-on: https://go-review.googlesource.com/83155 Reviewed-by: Ian Lance Taylor --- diff --git a/src/internal/poll/fd_mutex.go b/src/internal/poll/fd_mutex.go index 76174e5e9c..2ba7de7da3 100644 --- a/src/internal/poll/fd_mutex.go +++ b/src/internal/poll/fd_mutex.go @@ -65,7 +65,7 @@ func (mu *fdMutex) incref() bool { } // increfAndClose sets the state of mu to closed. -// It reports whether there is no remaining reference. +// It returns false if the file was already closed. func (mu *fdMutex) increfAndClose() bool { for { old := atomic.LoadUint64(&mu.state)