Browse Source

pool size support disabled when is zero

tags/v0.5.5
Lunny Xiao 1 year ago
parent
commit
f14dff14f8
Signed by: lunny <xiaolunwen@gmail.com> GPG Key ID: C3B7C91B632F738A
2 changed files with 5 additions and 2 deletions
  1. +4
    -1
      pool.go
  2. +1
    -1
      tan.go

+ 4
- 1
pool.go View File

@@ -29,7 +29,10 @@ func newPool(size int, tp reflect.Type) *pool {
}

func (p *pool) New() reflect.Value {
//return reflect.New(p.stp)
if p.size == 0 {
return reflect.New(p.stp)
}

p.lock.Lock()
if p.cur == p.pool.Len() {
p.pool = reflect.MakeSlice(p.tp, p.size, p.size)


+ 1
- 1
tan.go View File

@@ -14,7 +14,7 @@ import (

// Version returns tango's version
func Version() string {
return "0.5.4.0517"
return "0.5.5.0104"
}

// Tango describes tango object


Loading…
Cancel
Save