- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for TestRWMutex (0.12 sec)
-
src/runtime/rwmutex_test.go
for ; i < numReaders; i++ { go reader(&rwm, num_iterations, &activity, cdone) } // Wait for the 2 writers and all readers to finish. for i := 0; i < 2+numReaders; i++ { <-cdone } } func TestRWMutex(t *testing.T) { defer GOMAXPROCS(GOMAXPROCS(-1)) n := 1000 if testing.Short() { n = 5 } HammerRWMutex(1, 1, n) HammerRWMutex(1, 3, n) HammerRWMutex(1, 10, n) HammerRWMutex(4, 1, n)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 15 22:00:45 UTC 2023 - 4.2K bytes - Viewed (0) -
src/sync/rwmutex_test.go
for ; i < numReaders; i++ { go reader(&rwm, num_iterations, &activity, cdone) } // Wait for the 2 writers and all readers to finish. for i := 0; i < 2+numReaders; i++ { <-cdone } } func TestRWMutex(t *testing.T) { var m RWMutex m.Lock() if m.TryLock() { t.Fatalf("TryLock succeeded with mutex locked") } if m.TryRLock() { t.Fatalf("TryRLock succeeded with mutex locked") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 29 17:13:13 UTC 2021 - 4.9K bytes - Viewed (0) -
internal/lsync/lrwmutex_test.go
go reader(rwm, numIterations, &activity, cdone) } // Wait for the 2 writers and all readers to finish. for i := 0; i < 2+numReaders; i++ { <-cdone } } // Borrowed from rwmutex_test.go func TestRWMutex(t *testing.T) { defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(-1)) n := 1000 if testing.Short() { n = 5 } HammerRWMutex(1, 1, n) HammerRWMutex(1, 3, n) HammerRWMutex(1, 10, n)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sun Mar 05 04:57:35 UTC 2023 - 7.9K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
} // Wait for the 2 writers and all readers to finish. for i := 0; i < 2+numReaders; i++ { <-cdone } }) } // Borrowed from rwmutex_test.go func TestRWMutex(t *testing.T) { defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(-1)) n := 100 if testing.Short() { n = 5 } hammerRWMutex(t, 1, 1, n) hammerRWMutex(t, 1, 3, n) hammerRWMutex(t, 1, 10, n)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0)