mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
mainthread: Add comments
This commit is contained in:
parent
87b4b8b1b4
commit
a5421de8ab
@ -45,6 +45,8 @@ func Loop(ch <-chan error) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Run calls f on the main thread.
|
// 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 {
|
func Run(f func() error) error {
|
||||||
if atomic.LoadInt32(&started) == 0 {
|
if atomic.LoadInt32(&started) == 0 {
|
||||||
// TODO: This can reach from other goroutine before Loop is called (#809).
|
// TODO: This can reach from other goroutine before Loop is called (#809).
|
||||||
|
Loading…
Reference in New Issue
Block a user