Skip to content

Wait for the renderer goroutine before Resetting its ticker - #1781

Open
AshSgDe29071999 wants to merge 1 commit into
charmbracelet:mainfrom
AshSgDe29071999:fix/wait-renderer-stop
Open

Wait for the renderer goroutine before Resetting its ticker#1781
AshSgDe29071999 wants to merge 1 commit into
charmbracelet:mainfrom
AshSgDe29071999:fix/wait-renderer-stop

Conversation

@AshSgDe29071999

Copy link
Copy Markdown

stopRenderer signaled the render loop and returned immediately. The old goroutine's ticker.Stop() could run after startRenderer's ticker.Reset(), which permanently stops the ticker.

After tea.Exec / ReleaseTerminal / RestoreTerminal, the program kept processing messages while the terminal froze.

stopRenderer now waits for the render goroutine to exit before startRenderer resets the ticker.

Fixes #1778

stopRenderer returned as soon as it signaled done, so the old goroutine's
ticker.Stop could run after startRenderer's ticker.Reset. After tea.Exec
the program kept running but the terminal froze.

Fixes charmbracelet#1778
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant