tinygo/src/sync/pool.go
2018-10-20 15:52:41 +02:00

16 строки
338 Б
Go

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{}) {
}