Source File
pool.go
Belonging Package
github.com/json-iterator/go
package jsoniterimport ()// IteratorPool a thread safe pool of iterators with same configurationtype IteratorPool interface {BorrowIterator(data []byte) *IteratorReturnIterator(iter *Iterator)}// StreamPool a thread safe pool of streams with same configurationtype StreamPool interface {BorrowStream(writer io.Writer) *StreamReturnStream(stream *Stream)}func ( *frozenConfig) ( io.Writer) *Stream {:= .streamPool.Get().(*Stream).Reset()return}func ( *frozenConfig) ( *Stream) {.out = nil.Error = nil.Attachment = nil.streamPool.Put()}func ( *frozenConfig) ( []byte) *Iterator {:= .iteratorPool.Get().(*Iterator).ResetBytes()return}func ( *frozenConfig) ( *Iterator) {.Error = nil.Attachment = nil.iteratorPool.Put()}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |