Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/mux: remove a hack to avoid goroutines for Windows #235

Open
hajimehoshi opened this issue Apr 11, 2024 · 0 comments
Open

internal/mux: remove a hack to avoid goroutines for Windows #235

hajimehoshi opened this issue Apr 11, 2024 · 0 comments
Assignees

Comments

@hajimehoshi
Copy link
Member

Windows timer resolution was not good and caused some issues (hajimehoshi/ebiten#1768), and mux.playerImpl.Play has a hack to avoid goroutines for Windows.

oto/internal/mux/mux.go

Lines 216 to 222 in 457cd3e

// Goroutines don't work effiently on Windows. Avoid using them (hajimehoshi/ebiten#1768).
if runtime.GOOS == "windows" {
p.m.Lock()
defer p.m.Unlock()
p.playImpl()
} else {

As of Go 1.23, Windows uses much better timer reoslutions golang/go#44343 so we might no longer need this hack in the future.

@hajimehoshi hajimehoshi self-assigned this Apr 11, 2024
hajimehoshi added a commit to hajimehoshi/ebiten that referenced this issue Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant