github.com/aykevl/tinygo@v0.5.0/src/sync/pool.go (about) 1 package sync 2 3 // Pool is a very simple implementation of sync.Pool. It does not actually 4 // implement a pool. 5 type Pool struct { 6 New func() interface{} 7 } 8 9 // Get returns the value of calling Pool.New(). 10 func (p *Pool) Get() interface{} { 11 return p.New() 12 } 13 14 // Put drops the value put into the pool. 15 func (p *Pool) Put(x interface{}) { 16 }