Limit concurrent shards loading to number of cores available

pull/6626/head
Jason Wilder 2016-05-13 15:10:18 -06:00
parent 11871958c6
commit 5b6f3afefa
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import (
"log"
"os"
"path/filepath"
"runtime"
"sort"
"strconv"
"strings"
@ -131,7 +132,7 @@ func (s *Store) loadShards() error {
err error
}
throttle := newthrottle(4)
throttle := newthrottle(runtime.GOMAXPROCS(0))
resC := make(chan *res)
var n int