Skip to content

mkmik/syncpool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

syncpool

The mkm.pub/syncpool package provides a generic wrapper around the sync.Pool structure.

This package is just a thin wrapper around the underlying interface{} based implementation in the stdlib.

It requires go1.18. If when you're reading this go1.18 is not released yet you can download 1.18beta or just try with the latest gotip.

Usage

go get mkm.pub/syncpool
p := syncpool.New(NewFoo)
var v Foo
v = p.Get()
// ...
p.Put(v)

About

generic sync.Pool

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages