Pool is a very simple implementation of sync.Pool.
| 4 | |
| 5 | // Pool is a very simple implementation of sync.Pool. |
| 6 | type Pool struct { |
| 7 | lock task.PMutex |
| 8 | New func() interface{} |
| 9 | items []interface{} |
| 10 | } |
| 11 | |
| 12 | // Get returns an item in the pool, or the value of calling Pool.New() if there are no items. |
| 13 | func (p *Pool) Get() interface{} { |
nothing calls this directly
no outgoing calls
no test coverage detected