Limit concurrent shards loading to number of cores available
parent
11871958c6
commit
5b6f3afefa
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue