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

Function parallelReader

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

Source from the content-addressed store, hash-verified

83}
84
85func parallelReader(r *http.Request, key string, iterations int, wait, done chan struct{}) {
86 <-wait
87 for i := 0; i < iterations; i++ {
88 Get(r, key)
89 }
90 done <- struct{}{}
91
92}
93
94func parallelWriter(r *http.Request, key, value string, iterations int, wait, done chan struct{}) {
95 <-wait

Callers 1

benchmarkMutexFunction · 0.85

Calls 1

GetFunction · 0.85

Tested by

no test coverage detected