code: func Loop(ch <-chan error) error {
  	atomic.StoreInt32(&started, 1)
  	for {
  		select {
  		case f := <-funcs:
  			f()
  		case err := <-ch:
  			// ch returns a value not only when an error occur but also it is closed.
  			return err
  		}
  	}
  }
docs: // Loop starts the main-thread loop.
  //
  // Loop must be called on the main thread.