MCPcopy
hub / github.com/charmbracelet/bubbletea / waitForReadLoop

Method waitForReadLoop

tty.go:97–105  ·  view source on GitHub ↗

waitForReadLoop waits for the cancelReader to finish its read loop.

()

Source from the content-addressed store, hash-verified

95
96// waitForReadLoop waits for the cancelReader to finish its read loop.
97func (p *Program) waitForReadLoop() {
98 select {
99 case <-p.readLoopDone:
100 case <-time.After(500 * time.Millisecond): //nolint:mnd
101 // The read loop hangs, which means the input
102 // cancelReader's cancel function has returned true even
103 // though it was not able to cancel the read.
104 }
105}
106
107// checkResize detects the current size of the output and informs the program
108// via a WindowSizeMsg.

Callers 3

initInputReaderMethod · 0.95
shutdownMethod · 0.95
releaseTerminalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected