mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
ui: Fix comments
This commit is contained in:
parent
fd4cdd445c
commit
248f51cc02
@ -266,7 +266,6 @@ func init() {
|
|||||||
window.Call("addEventListener", "load", js.NewCallback(func([]js.Value) {
|
window.Call("addEventListener", "load", js.NewCallback(func([]js.Value) {
|
||||||
close(ch)
|
close(ch)
|
||||||
}))
|
}))
|
||||||
// TODO: This blocks the main goroutine on GopherJS, but should not.
|
|
||||||
<-ch
|
<-ch
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,7 +381,8 @@ func Run(width, height int, scale float64, title string, g GraphicsContext, main
|
|||||||
return <-ch
|
return <-ch
|
||||||
}
|
}
|
||||||
|
|
||||||
// On GopherJS, the main goroutine must not be blocked. Return immediately.
|
// On GopherJS, the main goroutine cannot be blocked due to the bug (gopherjs/gopherjs#826).
|
||||||
|
// Return immediately.
|
||||||
go func() {
|
go func() {
|
||||||
if err := <-ch; err != nil {
|
if err := <-ch; err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
2
run.go
2
run.go
@ -127,7 +127,7 @@ func run(width, height int, scale float64, title string, g *graphicsContext, mai
|
|||||||
// 3) f returns error. In the case of 3), Run returns the same error.
|
// 3) f returns error. In the case of 3), Run returns the same error.
|
||||||
//
|
//
|
||||||
// On GopherJS, Run returns immediately.
|
// On GopherJS, Run returns immediately.
|
||||||
// It is because the 'main' goroutine cannot be blocked on GopherJS.
|
// It is because the 'main' goroutine cannot be blocked on GopherJS due to the bug (gopherjs/gopherjs#826).
|
||||||
// When an error happens, this is shown as an error on the console.
|
// When an error happens, this is shown as an error on the console.
|
||||||
//
|
//
|
||||||
// The size unit is device-independent pixel.
|
// The size unit is device-independent pixel.
|
||||||
|
Loading…
Reference in New Issue
Block a user