Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjPool ¶
type ObjPool struct {
// contains filtered or unexported fields
}
func NewObjPool ¶
func (*ObjPool) GetObj ¶
func (p *ObjPool) GetObj(timeout time.Duration) (*ReusableObj, error)
func (p *ObjPool) GetObj(timeout time.Duration) (obj interface{}, error) { //可以放任何对象
func (*ObjPool) ReleaseObj ¶
func (p *ObjPool) ReleaseObj(obj *ReusableObj) error
type ReusableObj ¶
type ReusableObj struct { }
Click to show internal directories.
Click to hide internal directories.