sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.57k stars 268 forks source link

is safe to use goroutine? #273

Closed jilieryuyi closed 3 years ago

jilieryuyi commented 3 years ago

go func() { tick := time.NewTicker(time.Second) defer tick.Stop() for { select { case <- tick.C: win.Call("callback", res) } } }()

Is it safe to use the goroutine to perform some blocking operations and call back the UI display after success? Often meet UI dead!

$ go version go version go1.13.5 windows/amd64