go/src/sync
Gaurav Singh 5a18e0b58c sync: fix goroutine leak for when TestMutexFairness times out
If the timeout triggers before writing to the done channel, the
goroutine will be blocked waiting for a corresponding read that’s
no longer existent, thus a goroutine leak. This change fixes that by
using a buffered channel instead.

Change-Id: I9cf4067a58bc5a729ab31e4426edd78bd359e8e0
GitHub-Last-Rev: a7d811a7be
GitHub-Pull-Request: golang/go#40236
Reviewed-on: https://go-review.googlesource.com/c/go/+/242902
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-08-14 23:04:16 +00:00
..
atomic sync/atomic: fix TestSwapPointer test 2020-04-02 03:47:13 +00:00
cond.go
cond_test.go
example_pool_test.go
example_test.go
export_test.go
map.go sync: add new Map method LoadAndDelete 2020-02-25 14:31:55 +00:00
map_bench_test.go sync: add new Map method LoadAndDelete 2020-02-25 14:31:55 +00:00
map_reference_test.go sync: add new Map method LoadAndDelete 2020-02-25 14:31:55 +00:00
map_test.go sync: add new Map method LoadAndDelete 2020-02-25 14:31:55 +00:00
mutex.go sync: yield to the waiter when unlocking a starving mutex 2019-11-09 19:31:32 +00:00
mutex_test.go sync: fix goroutine leak for when TestMutexFairness times out 2020-08-14 23:04:16 +00:00
once.go
once_test.go
pool.go
pool_test.go
poolqueue.go
runtime.go runtime: static lock ranking for the runtime (enabled by GOEXPERIMENT) 2020-04-07 21:51:03 +00:00
runtime2.go runtime, sync: add copyright headers to new files 2020-07-25 03:26:17 +00:00
runtime2_lockrank.go runtime, sync: add copyright headers to new files 2020-07-25 03:26:17 +00:00
runtime_sema_test.go
rwmutex.go
rwmutex_test.go net/textproto, sync: unlock mutexes appropriately before panics 2020-04-08 16:19:51 +00:00
waitgroup.go
waitgroup_test.go sync: deflake TestWaitGroupMisuse3 2019-12-06 05:12:15 +00:00