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

Function TestPoolVariousSizesConcurrent

pool_test.go:47–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

45}
46
47func TestPoolVariousSizesConcurrent(t *testing.T) {
48 concurrency := 5
49 ch := make(chan struct{})
50 for i := 0; i < concurrency; i++ {
51 go func() {
52 testPoolVariousSizes(t)
53 ch <- struct{}{}
54 }()
55 }
56 for i := 0; i < concurrency; i++ {
57 select {
58 case <-ch:
59 case <-time.After(3 * time.Second):
60 t.Fatalf("timeout")
61 }
62 }
63}
64
65func testPoolVariousSizes(t *testing.T) {
66 for i := 0; i < steps+1; i++ {

Callers

nothing calls this directly

Calls 1

testPoolVariousSizesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…