Skip to content

Commit

Permalink
optimise(gopool): no cap by default (bytedance#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
joway committed Apr 17, 2024
1 parent 412b644 commit 24be022
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/gopool/gopool.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package gopool
import (
"context"
"fmt"
"math"
"sync"
)

Expand All @@ -26,7 +27,7 @@ var defaultPool Pool
var poolMap sync.Map

func init() {
defaultPool = NewPool("gopool.DefaultPool", 10000, NewConfig())
defaultPool = NewPool("gopool.DefaultPool", math.MaxInt32, NewConfig())
}

// Go is an alternative to the go keyword, which is able to recover panic.
Expand Down

0 comments on commit 24be022

Please sign in to comment.