The Daily Go
Many suggest to use
Any item stored in the Pool may be removed automatically at any time without notification. If the Pool holds the only reference when this happens, the item might be deallocated.
#Note #Pool
Many suggest to use
sync.Pool
which is a fast, good implementation for temporary objects. But note that sync.Pool
does not guarantee that pooled objects are retained. Quoting from its doc:Any item stored in the Pool may be removed automatically at any time without notification. If the Pool holds the only reference when this happens, the item might be deallocated.
#Note #Pool
The Daily Go
Simple, faster, low memory usage and goroutine safe worker pool for Golang.
https://github.com/themester/GoSlaves
#Worker #Pool #Goroutine
Simple, faster, low memory usage and goroutine safe worker pool for Golang.
https://github.com/themester/GoSlaves
#Worker #Pool #Goroutine