go/src/sync
Jason7602 507a44dc22 sync: remove the redundant logic on sync.(*Pool).Put
When the procUnpin is placed after shared.pushHead, there is
no need for x as a flag to indicate the previous process.

This CL can make the logic clear, and at the same time reduce
a redundant judgment.

Change-Id: I34ec9ba4cb5b5dbdf13a8f158b90481fed248cf5
Reviewed-on: https://go-review.googlesource.com/c/go/+/360059
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-08 17:23:05 +00:00
..
atomic sync/atomic: don't run 64-bit uintptr tests on 32-bit systems 2022-05-06 02:40:50 +00:00
cond.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
cond_test.go all: add empty line between copyright header and package clause 2020-08-17 09:45:44 +00:00
example_pool_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
example_test.go sync: use example.com for url in ExampleWaitGroup 2021-10-09 14:53:12 +00:00
export_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
map.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
map_bench_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
map_reference_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
map_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
mutex.go runtime: differentiate "user" and "system" throws 2022-04-28 16:50:31 +00:00
mutex_test.go sync: add Mutex.TryLock, RWMutex.TryLock, RWMutex.TryRLock 2021-10-29 17:13:13 +00:00
once.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
once_test.go
pool.go sync: remove the redundant logic on sync.(*Pool).Put 2022-05-08 17:23:05 +00:00
pool_test.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
poolqueue.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
runtime.go runtime: static lock ranking for the runtime (enabled by GOEXPERIMENT) 2020-04-07 21:51:03 +00:00
runtime2.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
runtime2_lockrank.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
runtime_sema_test.go
rwmutex.go runtime: differentiate "user" and "system" throws 2022-04-28 16:50:31 +00:00
rwmutex_test.go sync: add Mutex.TryLock, RWMutex.TryLock, RWMutex.TryRLock 2021-10-29 17:13:13 +00:00
waitgroup.go sync: avoid a dynamic check in WaitGroup on 64-bit architectures 2021-10-19 18:21:38 +00:00
waitgroup_test.go sync: remove TestWaitGroupMisuse2 and TestWaitGroupMisuse3 2021-10-14 17:38:39 +00:00