diff options
Diffstat (limited to 'vendor/github.com')
-rw-r--r-- | vendor/github.com/gogits/git-module/tree_entry.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/github.com/gogits/git-module/tree_entry.go b/vendor/github.com/gogits/git-module/tree_entry.go index 8d2ea8e2..54574035 100644 --- a/vendor/github.com/gogits/git-module/tree_entry.go +++ b/vendor/github.com/gogits/git-module/tree_entry.go @@ -113,6 +113,8 @@ func (tes Entries) Sort() { sort.Sort(tes) } +var defaultConcurrency = runtime.NumCPU() + type commitInfo struct { entryName string infos []interface{} @@ -136,7 +138,7 @@ func (tes Entries) GetCommitsInfoWithCustomConcurrency(commit *Commit, treePath } if maxConcurrency <= 0 { - maxConcurrency = runtime.NumCPU() + maxConcurrency = defaultConcurrency } // Length of taskChan determines how many goroutines (subprocesses) can run at the same time. |