Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: a7d811a7be6d875175a894e53d474aa0034e7d2c GitHub-Pull-Request: golang/go#40236 Reviewed-on: https://go-review.googlesource.com/c/go/+/242902 Reviewed-by: Emmanuel Odeke <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
- Loading branch information