examples/shaderprecomp/metallib: stop using errgroup

This commit is contained in:
Hajime Hoshi 2024-05-06 17:25:21 +09:00
parent 10d9660125
commit a391da6c77
2 changed files with 6 additions and 10 deletions

View File

@ -68,6 +68,7 @@ func run() error {
srcs = append(srcs, defaultSrc)
for _, src := range srcs {
// Avoid using errgroup.Group.
// Compiling sources in parallel causes a mixed error message on the console.
if err := compile(src, tmpdir); err != nil {
return err

View File

@ -24,8 +24,6 @@ import (
"os/exec"
"path/filepath"
"golang.org/x/sync/errgroup"
"github.com/hajimehoshi/ebiten/v2/shaderprecomp"
)
@ -54,15 +52,12 @@ func run() error {
}
srcs = append(srcs, defaultSrc)
var wg errgroup.Group
for _, src := range srcs {
source := src
wg.Go(func() error {
return compile(source, tmpdir)
})
}
if err := wg.Wait(); err != nil {
return err
// Avoid using errgroup.Group.
// Compiling sources in parallel causes a mixed error message on the console.
if err := compile(src, tmpdir); err != nil {
return err
}
}
return nil
}