Active returns an estimate of currently borrowed items (Gets - Puts). May be negative during warm-up before items are returned to the pool.
()
| 30 | // Active returns an estimate of currently borrowed items (Gets - Puts). |
| 31 | // May be negative during warm-up before items are returned to the pool. |
| 32 | func (s PoolStat) Active() int64 { |
| 33 | return s.Gets - s.Puts |
| 34 | } |
| 35 | |
| 36 | // poolCounter is the internal per-pool atomic counter pair. |
| 37 | type poolCounter struct { |
no outgoing calls