mirror of https://github.com/perkeep/perkeep.git
Fix data races added in 161fc061d3
Change-Id: I7167472de3778fc76cc54dff6c864ed43b2052e9
This commit is contained in:
parent
b169d80589
commit
6e92302b1d
|
@ -236,6 +236,7 @@ func (s *storage) StatBlobs(dest chan<- blob.SizedRef, blobs []blob.Ref) (err er
|
||||||
var wg syncutil.Group
|
var wg syncutil.Group
|
||||||
|
|
||||||
for _, br := range blobs {
|
for _, br := range blobs {
|
||||||
|
br := br
|
||||||
statGate.Start()
|
statGate.Start()
|
||||||
wg.Go(func() error {
|
wg.Go(func() error {
|
||||||
defer statGate.Done()
|
defer statGate.Done()
|
||||||
|
|
|
@ -50,6 +50,7 @@ func (ds *DiskStorage) StatBlobs(dest chan<- blob.SizedRef, blobs []blob.Ref) er
|
||||||
|
|
||||||
var wg syncutil.Group
|
var wg syncutil.Group
|
||||||
for _, ref := range blobs {
|
for _, ref := range blobs {
|
||||||
|
ref := ref
|
||||||
statGate.Start()
|
statGate.Start()
|
||||||
wg.Go(func() error {
|
wg.Go(func() error {
|
||||||
defer statGate.Done()
|
defer statGate.Done()
|
||||||
|
|
|
@ -27,6 +27,7 @@ func (sto *s3Storage) RemoveBlobs(blobs []blob.Ref) error {
|
||||||
var wg syncutil.Group
|
var wg syncutil.Group
|
||||||
|
|
||||||
for _, blob := range blobs {
|
for _, blob := range blobs {
|
||||||
|
blob := blob
|
||||||
removeGate.Start()
|
removeGate.Start()
|
||||||
wg.Go(func() error {
|
wg.Go(func() error {
|
||||||
defer removeGate.Done()
|
defer removeGate.Done()
|
||||||
|
|
|
@ -30,6 +30,7 @@ func (sto *s3Storage) StatBlobs(dest chan<- blob.SizedRef, blobs []blob.Ref) err
|
||||||
var wg syncutil.Group
|
var wg syncutil.Group
|
||||||
|
|
||||||
for _, br := range blobs {
|
for _, br := range blobs {
|
||||||
|
br := br
|
||||||
statGate.Start()
|
statGate.Start()
|
||||||
wg.Go(func() error {
|
wg.Go(func() error {
|
||||||
defer statGate.Done()
|
defer statGate.Done()
|
||||||
|
|
Loading…
Reference in New Issue