MCPcopy Create free account
hub / github.com/valyala/bytebufferpool / TestByteBufferGetStringConcurrent

Function TestByteBufferGetStringConcurrent

bytebuffer_test.go:121–138  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

119}
120
121func TestByteBufferGetStringConcurrent(t *testing.T) {
122 concurrency := 10
123 ch := make(chan struct{}, concurrency)
124 for i := 0; i < concurrency; i++ {
125 go func() {
126 testByteBufferGetString(t)
127 ch <- struct{}{}
128 }()
129 }
130
131 for i := 0; i < concurrency; i++ {
132 select {
133 case <-ch:
134 case <-time.After(time.Second):
135 t.Fatalf("timeout!")
136 }
137 }
138}

Callers

nothing calls this directly

Calls 1

testByteBufferGetStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…