From 8c227765f70b5677901692a71d8662f395186a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C3=A8i=20C=C5=8Dngru=C3=AC?= Date: Mon, 11 Dec 2017 11:17:34 +0800 Subject: [PATCH] internal/poll: fix error in increfAndClose documentation Change-Id: I0c387b6286bc18fd00c6ac4e42bdf175cf89ccb1 Reviewed-on: https://go-review.googlesource.com/83155 Reviewed-by: Ian Lance Taylor --- src/internal/poll/fd_mutex.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)