Browse Source

Reconfigure waitgroup placing during file system diff

feature/create-install-pkgs
Tovi Jaeschke-Rogers 3 years ago
parent
commit
14dd717c74
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      Client/Filesystem/FilesystemDiff.go

+ 3
- 1
Client/Filesystem/FilesystemDiff.go View File

@ -116,6 +116,7 @@ func (fsStatus *FilesystemStatus) parseFile(indexBucket, picksBucket *bolt.Bucke
defer func() { defer func() {
bar.Increment() bar.Increment()
fsStatusWG.Done()
}() }()
pick = picksBucket.Get([]byte(p)) pick = picksBucket.Get([]byte(p))
@ -145,12 +146,13 @@ func (fsStatus *FilesystemStatus) parseFile(indexBucket, picksBucket *bolt.Bucke
fsStatusWG.Wait() fsStatusWG.Wait()
fsStatusWG.Add(1) fsStatusWG.Add(1)
fsStatus.ModifiedFiles = append(fsStatus.ModifiedFiles, p) fsStatus.ModifiedFiles = append(fsStatus.ModifiedFiles, p)
fsStatusWG.Done()
} }
return return
} }
fsStatusWG.Wait()
fsStatusWG.Add(1)
fsStatus.NewFiles = append(fsStatus.NewFiles, p) fsStatus.NewFiles = append(fsStatus.NewFiles, p)
return return


Loading…
Cancel
Save