aboutsummaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2019-11-07 14:09:23 +0000
committerBryan C. Mills <bcmills@google.com>2019-11-07 15:04:03 +0000
commit73d57bf80f42eda964768e1761b02ce9257638dc (patch)
tree3ba21d66f67576c718ba4383ddc85214599a4d0f /src/sync
parente8f01d591f9be2653bfb13c0214c4c96b64aa028 (diff)
downloadgo-73d57bf80f42eda964768e1761b02ce9257638dc.tar.gz
go-73d57bf80f42eda964768e1761b02ce9257638dc.zip
Revert "sync: yield to the waiter when unlocking a starving mutex"
This reverts CL 200577. Reason for revert: broke linux-arm64-packet and solaris-amd64-oraclerel builders Fixes #35424 Updates #33747 Change-Id: I2575fd84d37995d458183caae54704f15d8b8426 Reviewed-on: https://go-review.googlesource.com/c/go/+/205817 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/sync')
-rw-r--r--src/sync/mutex.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sync/mutex.go b/src/sync/mutex.go
index 3028552f74..11ad20c975 100644
--- a/src/sync/mutex.go
+++ b/src/sync/mutex.go
@@ -216,8 +216,7 @@ func (m *Mutex) unlockSlow(new int32) {
old = m.state
}
} else {
- // Starving mode: handoff mutex ownership to the next waiter, and yield
- // our time slice so that the next waiter can start to run immediately.
+ // Starving mode: handoff mutex ownership to the next waiter.
// Note: mutexLocked is not set, the waiter will set it after wakeup.
// But mutex is still considered locked if mutexStarving is set,
// so new coming goroutines won't acquire it.