Skip to content

Commit a7ee0ea

Browse files
committed
atomic buckets
1 parent 4443a1a commit a7ee0ea

File tree

3 files changed

+474
-397
lines changed

3 files changed

+474
-397
lines changed

sdk/metric/internal/aggregate/atomic.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ func (l *hotColdWaitGroup) start() uint64 {
193193
return l.startedCountAndHotIdx.Add(1) >> 63
194194
}
195195

196+
func (l *hotColdWaitGroup) loadHot() uint64 {
197+
return l.startedCountAndHotIdx.Load() >> 63
198+
}
199+
196200
// done signals to the reader that an operation has fully completed.
197201
// done is safe to call concurrently.
198202
func (l *hotColdWaitGroup) done(hotIdx uint64) {

0 commit comments

Comments
 (0)