(t *C)
| 118 | } |
| 119 | |
| 120 | func (suite *BoundedRWLockSuite) TestParallelReaders(t *C) { |
| 121 | // restore the original value after we are done with the test |
| 122 | defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(-1)) |
| 123 | |
| 124 | doTestParallelReaders(1, 4) |
| 125 | doTestParallelReaders(3, 4) |
| 126 | doTestParallelReaders(4, 2) |
| 127 | doTestParallelReaders(8, 100) |
| 128 | } |
| 129 | |
| 130 | // Stress test adapted from sync/rwmutex_test.go |
| 131 | func stressRWMutex(gomaxprocs int, numReaders int32, numIterations int) { |
nothing calls this directly
no test coverage detected