Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultMaxGoroutinesAmount 默认的协程最大数量 DefaultMaxGoroutinesAmount = 256 * 1024 // DefaultMaxGoroutineIdleDuration 默认协程最大空闲时间 DefaultMaxGoroutineIdleDuration = 10 * time.Second )
Variables ¶
View Source
var ErrLack = errors.New("lack of goroutines, because exceeded maxGoroutinesAmount limit")
Functions ¶
func FILOMustGo ¶
FILOMustGo 强制执行方法,并且传入上下文
func SetFILOPool ¶
Types ¶
type FILOPool ¶
type FILOPool struct {
// contains filtered or unexported fields
}
func NewFILOPool ¶
NewFILOPool 创建协程栈池
func (*FILOPool) MaxGoroutineIdle ¶
func (*FILOPool) MaxGoroutinesAmount ¶
Click to show internal directories.
Click to hide internal directories.