- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestWorkParallel (0.15 sec)
-
src/cmd/go/internal/par/work_test.go
if i >= 2 { w.Add(i - 1) w.Add(i - 2) } w.Add(i >> 1) w.Add((i >> 1) ^ 1) }) if n != N+1 { t.Fatalf("ran %d items, expected %d", n, N+1) } } func TestWorkParallel(t *testing.T) { for tries := 0; tries < 10; tries++ { var w Work[int] const N = 100 for i := 0; i < N; i++ { w.Add(i) } start := time.Now() var n int32 w.Do(N, func(x int) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 03 09:56:24 UTC 2023 - 1.5K bytes - Viewed (0)