Skip to content
/ pools Public

pools is a go package for managing a suite of differently sized slices of objects backed by sync.Pool

License

Notifications You must be signed in to change notification settings

stretchr/pools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pools GoDoc wercker status

pools is a go package for managing a suite of differently sized slices of objects backed by sync.Pool

Usage

Usage is almost identical to sync.Pool:

var s pools.Suite
s.New = func() interface{} {
	return MyObject{}
}
slice := s.Get(100) // returns a []MyObject of length 100
s.Put(slice) // put it back in the appropriate pool

About

pools is a go package for managing a suite of differently sized slices of objects backed by sync.Pool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published