这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@hajimehoshi

Description

@hajimehoshi

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions