Documentation ¶
Overview ¶
Package gpool provides a object-reusable concurrent-safe pool.
对象复用池.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct { Expire int64 // (毫秒)闲置最大时间,超过该时间则被系统回收 NewFunc func() (interface{}, error) // 创建对象的方法定义 ExpireFunc func(interface{}) // 对象的过期销毁方法(当池对象销毁需要执行额外的销毁操作时,需要定义该方法) // contains filtered or unexported fields }
对象池
Click to show internal directories.
Click to hide internal directories.