mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 18:41:59 -07: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