Fix a race where artifacts could print when exiting a program

This commit also consolidates the exit operations for consistency's
sake, and adds a kill() method to renderers for stopping them without
performing any final rendering.
This commit is contained in:
Christian Rocha
2021-05-19 21:35:36 -04:00
parent 85ab476698
commit 1f773e8f20
4 changed files with 46 additions and 16 deletions

View File

@@ -4,6 +4,7 @@ type nilRenderer struct{}
func (n nilRenderer) start() {}
func (n nilRenderer) stop() {}
func (n nilRenderer) kill() {}
func (n nilRenderer) write(v string) {}
func (n nilRenderer) repaint() {}
func (n nilRenderer) altScreen() bool { return false }