internal/thread: bug fix: do not close 'terminate' channel

The `terminate` channel is resued on mobiles (see (*UserInterface).Update
in internal/uidriver/mobile). The channel must not be closed.

Closes #1932
This commit is contained in:
Hajime Hoshi 2022-01-05 17:21:42 +09:00
parent 0d90c04c8a
commit c67e4385de

View File

@ -61,7 +61,7 @@ func (t *OSThread) Loop() {
// Stop stops the thread loop.
func (t *OSThread) Stop() {
close(t.terminate)
t.terminate <- struct{}{}
}
// Call calls f on the thread.