Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IItem ¶
type IItem interface {
Reset()
}
type Pool ¶
type Pool struct { Creators *PoolCreators ItemMap map[string][]interface{} ItemCount map[string]int }
func NewPool ¶
func NewPool(creator *PoolCreators) (obj *Pool)
type PoolCreators ¶
type PoolCreators struct {
Handler map[string]func() interface{}
}
为了避免使用锁
func NewPoolCreators ¶
func NewPoolCreators() (obj *PoolCreators)
func (*PoolCreators) Dispose ¶
func (p *PoolCreators) Dispose()
func (*PoolCreators) RegisterPoolItem ¶
func (p *PoolCreators) RegisterPoolItem(key string, creator func() interface{})
Click to show internal directories.
Click to hide internal directories.