only call Atoi on non empty strings
This commit is contained in:
parent
7362556c02
commit
ee6c0f8570
@ -146,20 +146,22 @@ func init() {
|
|||||||
concurrency := os.Getenv("LOTUS_FVM_CONCURRENCY")
|
concurrency := os.Getenv("LOTUS_FVM_CONCURRENCY")
|
||||||
if concurrency == "" {
|
if concurrency == "" {
|
||||||
available = DefaultAvailableExecutionLanes
|
available = DefaultAvailableExecutionLanes
|
||||||
}
|
} else {
|
||||||
available, err = strconv.Atoi(concurrency)
|
available, err = strconv.Atoi(concurrency)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
reserved := os.Getenv("LOTUS_FVM_CONCURRENCY_RESERVED")
|
reserved := os.Getenv("LOTUS_FVM_CONCURRENCY_RESERVED")
|
||||||
if reserved == "" {
|
if reserved == "" {
|
||||||
priority = DefaultPriorityExecutionLanes
|
priority = DefaultPriorityExecutionLanes
|
||||||
}
|
} else {
|
||||||
priority, err = strconv.Atoi(reserved)
|
priority, err = strconv.Atoi(reserved)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mx := &sync.Mutex{}
|
mx := &sync.Mutex{}
|
||||||
cond := sync.NewCond(mx)
|
cond := sync.NewCond(mx)
|
||||||
|
Loading…
Reference in New Issue
Block a user