MCPcopy Create free account
hub / github.com/cloudwego/netpoll / TestPollClose

Function TestPollClose

poll_test.go:116–127  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

114}
115
116func TestPollClose(t *testing.T) {
117 p, err := openDefaultPoll()
118 MustNil(t, err)
119 var wg sync.WaitGroup
120 wg.Add(1)
121 go func() {
122 p.Wait()
123 wg.Done()
124 }()
125 p.Close()
126 wg.Wait()
127}
128
129func BenchmarkPollMod(b *testing.B) {
130 b.StopTimer()

Callers

nothing calls this directly

Calls 5

AddMethod · 0.80
openDefaultPollFunction · 0.70
WaitMethod · 0.65
CloseMethod · 0.65
MustNilFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…