MCPcopy Create free account
hub / github.com/gorilla/context / parallelWriter

Function parallelWriter

context_test.go:94–101  ·  view source on GitHub ↗
(r *http.Request, key, value string, iterations int, wait, done chan struct{})

Source from the content-addressed store, hash-verified

92}
93
94func parallelWriter(r *http.Request, key, value string, iterations int, wait, done chan struct{}) {
95 <-wait
96 for i := 0; i < iterations; i++ {
97 Set(r, key, value)
98 }
99 done <- struct{}{}
100
101}
102
103func benchmarkMutex(b *testing.B, numReaders, numWriters, iterations int) {
104

Callers 1

benchmarkMutexFunction · 0.85

Calls 1

SetFunction · 0.85

Tested by

no test coverage detected