From 87b4b8b1b4b9b8f67c90ea9809233cf228565ea2 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 8 Feb 2019 20:11:46 -1000 Subject: [PATCH] mainthread: Disable panic temporarily Fixes #809 --- internal/mainthread/mainthread.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/mainthread/mainthread.go b/internal/mainthread/mainthread.go index c54cc618a..184b870b4 100644 --- a/internal/mainthread/mainthread.go +++ b/internal/mainthread/mainthread.go @@ -47,7 +47,8 @@ func Loop(ch <-chan error) error { // Run calls f on the main thread. func Run(f func() error) error { if atomic.LoadInt32(&started) == 0 { - panic("mainthread: the mainthread loop is not started yet") + // TODO: This can reach from other goroutine before Loop is called (#809). + // panic("mainthread: the mainthread loop is not started yet") } ch := make(chan struct{})