mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
Do initial repository scan in parallel (ref #210)
This commit is contained in:
parent
0d3caa2183
commit
21335d65c4
@ -556,9 +556,16 @@ func (m *Model) ScanRepos() {
|
||||
}
|
||||
m.rmut.RUnlock()
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(len(repos))
|
||||
for _, repo := range repos {
|
||||
m.ScanRepo(repo)
|
||||
repo := repo
|
||||
go func() {
|
||||
m.ScanRepo(repo)
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
func (m *Model) ScanRepo(repo string) error {
|
||||
|
Loading…
Reference in New Issue
Block a user