diff --git a/internal/mainthread/mainthread.go b/internal/mainthread/mainthread.go index 184b870b4..6491e3ee3 100644 --- a/internal/mainthread/mainthread.go +++ b/internal/mainthread/mainthread.go @@ -45,6 +45,8 @@ func Loop(ch <-chan error) error { } // Run calls f on the main thread. +// +// Do not call this from the main thread. This would block forever. func Run(f func() error) error { if atomic.LoadInt32(&started) == 0 { // TODO: This can reach from other goroutine before Loop is called (#809).