mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
examples/shaderprecomp/metallib: stop using errgroup
This commit is contained in:
parent
10d9660125
commit
a391da6c77
@ -68,6 +68,7 @@ func run() error {
|
|||||||
srcs = append(srcs, defaultSrc)
|
srcs = append(srcs, defaultSrc)
|
||||||
|
|
||||||
for _, src := range srcs {
|
for _, src := range srcs {
|
||||||
|
// Avoid using errgroup.Group.
|
||||||
// Compiling sources in parallel causes a mixed error message on the console.
|
// Compiling sources in parallel causes a mixed error message on the console.
|
||||||
if err := compile(src, tmpdir); err != nil {
|
if err := compile(src, tmpdir); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -24,8 +24,6 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"golang.org/x/sync/errgroup"
|
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten/v2/shaderprecomp"
|
"github.com/hajimehoshi/ebiten/v2/shaderprecomp"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -54,15 +52,12 @@ func run() error {
|
|||||||
}
|
}
|
||||||
srcs = append(srcs, defaultSrc)
|
srcs = append(srcs, defaultSrc)
|
||||||
|
|
||||||
var wg errgroup.Group
|
|
||||||
for _, src := range srcs {
|
for _, src := range srcs {
|
||||||
source := src
|
// Avoid using errgroup.Group.
|
||||||
wg.Go(func() error {
|
// Compiling sources in parallel causes a mixed error message on the console.
|
||||||
return compile(source, tmpdir)
|
if err := compile(src, tmpdir); err != nil {
|
||||||
})
|
return err
|
||||||
}
|
}
|
||||||
if err := wg.Wait(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user