capnproto / go-capnp

Cap'n Proto library and code generator for Go

Home Page:https://capnproto.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MultiSegmentArena: avoid footguns with sync.Pool

zenhack opened this issue · comments

Per @lthibault comment, we should consider whether we can/should make our use of sync.Pool for MultiSegment harder to misuse; for an rpc workload messages are likely to be of similar, reasonable sizes, but other users of the library might have some large messages that we may not want to keep in the pool for memory use reasons.