MCPcopy
hub / github.com/dropbox/godropbox / TestParallelReaders

Method TestParallelReaders

sync2/boundedrwlock_test.go:120–128  ·  view source on GitHub ↗
(t *C)

Source from the content-addressed store, hash-verified

118}
119
120func (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
131func stressRWMutex(gomaxprocs int, numReaders int32, numIterations int) {

Callers

nothing calls this directly

Calls 1

doTestParallelReadersFunction · 0.85

Tested by

no test coverage detected