You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A goroutine-safe container for hot-swapping heavy objects (e.g., caches, configurations) without blocking readers or generating GC pressure.
7
-
8
-
Wraps a `sync.Pool` with atomic reference counting to enable non-blocking reads while ensuring old objects are only recycled after all readers finish.
6
+
Safe Copy-on-Write with `sync.Pool`. Wraps a `sync.Pool` with atomic reference counting to enable non-blocking reads while ensuring old objects are only recycled after all readers finish.
9
7
10
8
**Contents**
11
9
-[Why?](#why)
@@ -28,7 +26,7 @@ Read-mostly shared resources that need periodic updates present a tradeoff:
28
26
29
27
- Non-blocking reads (lock held only during pointer acquisition)
30
28
- Object reuse via `sync.Pool` (zero-allocation at steady state)
0 commit comments