hajimehoshi / ebiten

Ebitengine - A dead simple 2D game engine for Go
https://ebitengine.org
Apache License 2.0
11.13k stars 663 forks source link

audio: `applicationState` is not thread safe in `error_ios.go` #3021

Closed hajimehoshi closed 4 months ago

hajimehoshi commented 5 months ago

Ebitengine Version

ffb77757f0ed50a61b1b8a218a43695a6f262918

Operating System

Go Version (go version)

go version go1.22.3 darwin/arm64

What steps will reproduce the problem?

Just run an iOS application with Ebitengine. This is a known issue in audio/error_ios.go

What is the expected result?

The function is thread safe (and warnings are shown)

What happens instead?

The function is not thread safe

Anything else you feel useful to add?

Use https://developer.apple.com/documentation/foundation/nsthread/1412704-ismainthread