mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
5038b8b645
commit
7018d1aebe
18
internal/processtest/testdata/issue2079.go
vendored
18
internal/processtest/testdata/issue2079.go
vendored
@ -43,17 +43,17 @@ func (g *Game) Layout(width, height int) (int, int) {
|
||||
done := make(chan struct{})
|
||||
timeout := time.After(time.Second)
|
||||
go func() {
|
||||
select {
|
||||
case <-done:
|
||||
case <-timeout:
|
||||
panic("timeout")
|
||||
}
|
||||
i := ebiten.NewImage(width, height)
|
||||
i.Fill(color.White)
|
||||
i.Dispose()
|
||||
close(done)
|
||||
}()
|
||||
defer close(done)
|
||||
|
||||
i := ebiten.NewImage(width, height)
|
||||
i.Fill(color.White)
|
||||
i.Dispose()
|
||||
select {
|
||||
case <-done:
|
||||
case <-timeout:
|
||||
panic("timeout")
|
||||
}
|
||||
return width, height
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user