]> Cypherpunks repositories - gostls13.git/commit
sync: deflake TestPool and TestPoolNew
authorAliaksandr Valialkin <valyala@gmail.com>
Thu, 25 May 2017 22:14:30 +0000 (01:14 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 28 Jun 2017 22:02:07 +0000 (22:02 +0000)
commit3ea53cb08f1709b2f9bf39cfcfaa1d285256baa2
tree83f64dcfb5ec12f889ce6f37642dd9b20d0c5e82
parent0f61ae7e17cb13ad530b6c6708157d7b8dc0aa8f
sync: deflake TestPool and TestPoolNew

Prevent possible goroutine rescheduling to another P between
Put and Get calls by locking the goroutine to OS thread.

Inspired by the CL 42770.

Fixes #20198.

Change-Id: I18e24fcad1630658713e6b9d80d90d7941f604be
Reviewed-on: https://go-review.googlesource.com/44310
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/sync/export_test.go
src/sync/pool_test.go