mirror of
https://github.com/smallnest/rpcx.git
synced 2025-09-26 20:21:14 +08:00
#756 fix pool issue
This commit is contained in:
@@ -44,12 +44,12 @@ func (p *typePools) Init(t reflect.Type) {
|
||||
func (p *typePools) Put(t reflect.Type, x interface{}) {
|
||||
if o, ok := x.(Reset); ok {
|
||||
o.Reset()
|
||||
p.mu.RLock()
|
||||
pool := p.pools[t]
|
||||
p.mu.RUnlock()
|
||||
pool.Put(x)
|
||||
}
|
||||
|
||||
p.mu.RLock()
|
||||
pool := p.pools[t]
|
||||
p.mu.RUnlock()
|
||||
pool.Put(x)
|
||||
}
|
||||
|
||||
func (p *typePools) Get(t reflect.Type) interface{} {
|
||||
|
Reference in New Issue
Block a user