MCPcopy Create free account
hub / github.com/charmbracelet/bubbletea / waitForReadLoop

Method waitForReadLoop

tty.go:110–118  ·  view source on GitHub ↗

waitForReadLoop waits for the cancelReader to finish its read loop.

()

Source from the content-addressed store, hash-verified

108
109// waitForReadLoop waits for the cancelReader to finish its read loop.
110func (p *Program) waitForReadLoop() {
111 select {
112 case <-p.readLoopDone:
113 case <-time.After(500 * time.Millisecond): //nolint:mnd
114 // The read loop hangs, which means the input
115 // cancelReader's cancel function has returned true even
116 // though it was not able to cancel the read.
117 }
118}
119
120const (
121 defaultWidth = 80

Callers 3

initInputReaderMethod · 0.95
shutdownMethod · 0.95
releaseTerminalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected