Synchronize screen

This commit is contained in:
Zachary Yedidia
2018-08-28 14:24:59 -04:00
parent 970bb78500
commit ec53d5deeb
4 changed files with 35 additions and 20 deletions

View File

@@ -144,8 +144,9 @@ func main() {
go func() {
events = make(chan tcell.Event)
for {
// TODO: fix race condition with screen.Screen = nil
screen.Lock()
events <- screen.Screen.PollEvent()
screen.Unlock()
}
}()