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

Method Reset

poll_manager.go:121–127  ·  view source on GitHub ↗

Reset pollers, this operation is very dangerous, please make sure to do this when calling !

()

Source from the content-addressed store, hash-verified

119
120// Reset pollers, this operation is very dangerous, please make sure to do this when calling !
121func (m *manager) Reset() error {
122 for _, poll := range m.polls {
123 poll.Close()
124 }
125 m.polls = nil
126 return m.Run()
127}
128
129// Pick will select the poller for use each time based on the LoadBalance.
130func (m *manager) Pick() Poll {

Callers 4

WaitMethod · 0.45
waitReadWithTimeoutMethod · 0.45
waitFlushMethod · 0.45
TestPollManagerResetFunction · 0.45

Calls 2

RunMethod · 0.95
CloseMethod · 0.65

Tested by 1

TestPollManagerResetFunction · 0.36