go/src/sync
Michael Anthony Knyszek e6cd9c083e sync: set GOMAXPROCS to 1 in TestPoolGC
This test expects to be able to drain a Pool using only Get. This isn't
actually possible in the general case, since a pooled value could get
stuck in some P's private slot. However, if GOMAXPROCS=1, there's only 1
P we could be running on, so getting stuck becomes impossible.

This test isn't checking any concurrent properties of Pool, so this is
fine. Just set GOMAXPROCS=1 for this one particular test.

Fixes #73728.

Change-Id: I9053e28118060650f2cd7d0d58f5a86d630b36f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/673375
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2025-05-16 09:55:03 -07:00
..
atomic sync/atomic: document that atomic types should not be copied 2025-04-24 16:10:59 -07:00
cond.go sync: include links to the Go memory model in package documentation 2024-06-07 21:14:51 +00:00
cond_test.go sync: fix TestCondSignalStealing flake 2023-03-22 18:52:42 +00:00
example_pool_test.go
example_test.go sync: tidy WaitGroup documentation, add WaitGroup.Go example 2025-04-25 15:40:11 -07:00
export_test.go all: make struct comments match struct names 2024-07-11 17:23:45 +00:00
hashtriemap.go sync: document behavior of Map.Delete when key is not present 2025-03-05 03:28:07 -08:00
map.go sync: make HashTrieMap[any, any] the default implementation of Map 2024-11-18 20:35:42 +00:00
map_bench_test.go sync: add HashTrieMap to Map tests and benchmarks 2024-11-18 20:35:37 +00:00
map_reference_test.go sync: add HashTrieMap to Map tests and benchmarks 2024-11-18 20:35:37 +00:00
map_test.go sync: use runtime.AddCleanup instead of runtime.SetFinalizer 2025-02-14 07:29:34 -08:00
mutex.go internal/sync: move sync.Mutex implementation into new package 2024-11-18 19:57:35 +00:00
mutex_test.go all: use testenv.Executable instead of os.Executable and os.Args[0] 2025-02-24 11:03:10 -08:00
once.go sync: use atomic.Bool for Once.done 2025-04-22 08:28:13 -07:00
once_test.go
oncefunc.go sync: don't keep func alive after OnceFunc panics 2025-02-26 12:52:02 -08:00
oncefunc_test.go runtime: schedule cleanups across multiple goroutines 2025-05-08 11:10:33 -07:00
pool.go sync: include links to the Go memory model in package documentation 2024-06-07 21:14:51 +00:00
pool_test.go sync: set GOMAXPROCS to 1 in TestPoolGC 2025-05-16 09:55:03 -07:00
poolqueue.go sync: simplify the code with atomic.Pointer 2024-02-26 18:12:29 +00:00
runtime.go internal/synctest: new package for testing concurrent code 2024-11-19 19:40:40 +00:00
runtime2.go
runtime2_lockrank.go
runtime_sema_test.go
rwmutex.go sync: document RWMutex locks cannot be upgraded / downgraded 2024-12-04 02:44:30 +00:00
rwmutex_test.go
waitgroup.go sync: WaitGroup.Go: document that f must not panic 2025-05-01 12:34:03 -07:00
waitgroup_test.go sync: add WaitGroup.Go 2025-04-04 08:19:32 -07:00