MCPcopy
hub / github.com/golang/net / Done

Method Done

http2/pipe.go:173–184  ·  view source on GitHub ↗

Done returns a channel which is closed if and when this pipe is closed with CloseWithError.

()

Source from the content-addressed store, hash-verified

171// Done returns a channel which is closed if and when this pipe is closed
172// with CloseWithError.
173func (p *pipe) Done() <-chan struct{} {
174 p.mu.Lock()
175 defer p.mu.Unlock()
176 if p.donec == nil {
177 p.donec = make(chan struct{})
178 if p.err != nil || p.breakErr != nil {
179 // Already hit an error.
180 p.closeDoneLocked()
181 }
182 }
183 return p.donec
184}

Callers 15

TestPipeDoneChanFunction · 0.95
TestPipeDoneChan_BreakFunction · 0.95
waitOnDoneMethod · 0.80
BenchmarkReadByteFunction · 0.80
BenchmarkWriteByteFunction · 0.80
waitAndLockMethod · 0.80

Calls 3

closeDoneLockedMethod · 0.95
LockMethod · 0.80
UnlockMethod · 0.65