Open
Description
Provide a way to create/access cpu local objects. This may make it easy to batch data per-CPU to reduce global locking. This is a feature request. Potential use case: scalable stats across many goroutines - stat updates are batched in the per-CPU stat object. Periodically or on-demand, the stat batches are aggregated to a global stat object. This is similar to sync.Pool in that it will help reducing lock contention, but different in that the object lifetime should be explicit and the per-CPU objects need to be accessible from other CPUs if necessary.