1
0
mirror of https://github.com/golang/go synced 2024-11-21 23:44:39 -07:00

zip: fix data race in test

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5492073
This commit is contained in:
Brad Fitzpatrick 2011-12-19 15:40:10 -08:00
parent d2933e9902
commit 315b361f89

View File

@ -163,10 +163,10 @@ func readTestZip(t *testing.T, zt ZipTest) {
done := make(chan bool)
for i := 0; i < 5; i++ {
for j, ft := range zt.File {
go func() {
go func(j int, ft ZipTestFile) {
readTestFile(t, ft, z.File[j])
done <- true
}()
}(j, ft)
n++
}
}