You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING: DATA RACE
Read at 0x00c000036110 by goroutine 55:
go/pkg/mod/github.com/bitfield/script@v0.22.0/script.go:388 +0x1e9
github.com/bitfield/script.(*Pipe).Filter.func1()
go/pkg/mod/github.com/bitfield/script@v0.22.0/script.go:484 +0xc7
Previous write at 0x00c000036110 by goroutine 49:
github.com/bitfield/script.(*Pipe).WithStderr()
go/pkg/mod/github.com/bitfield/script@v0.22.0/script.go:887 +0x798
There seems to be a data race with stdErr when executing the following piece of code in parallel (test with errgroup).
It doesn't really make a lot of sense to set the pipe's stdout or stderr after you've already started some command—you may or may not lose some of the output, depending on timing. The more reliable way to do this would be to set the preferred outputs first:
A data race still exists, of course: this merely adjusts the odds in your favour. The pipe already has a mutex, so we could use this to protect these fields. I'll have a look.
There seems to be a data race with stdErr when executing the following piece of code in parallel (test with errgroup).
The text was updated successfully, but these errors were encountered: