mirror of https://github.com/tinygo-org/tinygo.git
Ayke van Laethem
6 years ago
1 changed files with 16 additions and 0 deletions
@ -0,0 +1,16 @@ |
|||
package sync |
|||
|
|||
// Pool is a very simple implementation of sync.Pool. It does not actually
|
|||
// implement a pool.
|
|||
type Pool struct { |
|||
New func() interface{} |
|||
} |
|||
|
|||
// Get returns the value of calling Pool.New().
|
|||
func (p *Pool) Get() interface{} { |
|||
return p.New() |
|||
} |
|||
|
|||
// Put drops the value put into the pool.
|
|||
func (p *Pool) Put(x interface{}) { |
|||
} |
Loading…
Reference in new issue