os: avoid crashing with a thundering herd in TestPipeThreads
os: avoid crashing with a thundering herd in TestPipeThreads

Fixes #21559

Change-Id: I3393c4bee4c84fe0724a9c9aeb1a809b1a92eea6
Reviewed-on: https://go-review.googlesource.com/63650
Run-TryBot: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Joe Tsai <ad9e03fbec35106ba742f446a098eef3d5e31d20@google.com>

polyverse-security/go,CAFxX/go,golang/go,polyverse-security/go,akutz/go,polyverse-security/go,nawawi/go,josharian/go,Cofyc/go,Cofyc/go,CAFxX/go,cloudflare/go,Cofyc/go,akutz/go,cloudflare/go,akutz/go,josharian/go,Cofyc/go,golang/go,polyverse-security/go,codestation/go,cloudflare/go,nawawi/go,codestation/go,golang/go,polyverse-security/go,josharian/go,codestation/go,CAFxX/go,codestation/go,golang/go,nawawi/go,josharian/go,nawawi/go,codestation/go,CAFxX/go,Cofyc/go,nawawi/go,CAFxX/go,nawawi/go,polyverse-security/go,akutz/go,akutz/go,CAFxX/go,Cofyc/go,Cofyc/go,josharian/go,josharian/go,josharian/go,golang/go,CAFxX/go,akutz/go,nawawi/go,codestation/go,cloudflare/go,cloudflare/go,golang/go,polyverse-security/go,cloudflare/go,codestation/go,CAFxX/go,nawawi/go,polyverse-security/go,josharian/go,akutz/go,cloudflare/go,Cofyc/go,golang/go,codestation/go,akutz/go,christopher-henderson/Go,golang/go,cloudflare/go