Skip to content
This repository was archived by the owner on Feb 3, 2021. It is now read-only.

Commit f14dff1

Browse files
committed
pool size support disabled when is zero
1 parent 07d2a32 commit f14dff1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pool.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ func newPool(size int, tp reflect.Type) *pool {
2929
}
3030

3131
func (p *pool) New() reflect.Value {
32-
//return reflect.New(p.stp)
32+
if p.size == 0 {
33+
return reflect.New(p.stp)
34+
}
35+
3336
p.lock.Lock()
3437
if p.cur == p.pool.Len() {
3538
p.pool = reflect.MakeSlice(p.tp, p.size, p.size)

tan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
// Version returns tango's version
1616
func Version() string {
17-
return "0.5.4.0517"
17+
return "0.5.5.0104"
1818
}
1919

2020
// Tango describes tango object

0 commit comments

Comments
 (0)