MCPcopy
hub / github.com/tinygo-org/tinygo / Pool

Struct Pool

src/sync/pool.go:6–10  ·  view source on GitHub ↗

Pool is a very simple implementation of sync.Pool.

Source from the content-addressed store, hash-verified

4
5// Pool is a very simple implementation of sync.Pool.
6type 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.
13func (p *Pool) Get() interface{} {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected