Web API package for use when compling Go to WASM
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

17 lines
198 B

package dom
type Loop struct {
stop chan bool
}
func NewLoop() *Loop {
return &Loop{
stop: make(chan bool),
}
}
func (l *Loop) Stop() { l.stop <- true }
func (l *Loop) Loop() {
<-l.stop
}