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
Copy file name to clipboardExpand all lines: Sources/CoreMetrics/Metrics.swift
+5-3
Original file line number
Diff line number
Diff line change
@@ -600,7 +600,8 @@ public enum MetricsSystem {
600
600
returntryself._factory.withWriterLock(body)
601
601
}
602
602
603
-
privatefinalclassFactoryBox{
603
+
// This can be `@unchecked Sendable` because we're manually gating access to mutable state with a lock.
604
+
privatefinalclassFactoryBox:@uncheckedSendable{
604
605
privateletlock=ReadWriteLock()
605
606
fileprivatevar_underlying:MetricsFactory
606
607
privatevarinitialized=false
@@ -797,9 +798,10 @@ internal final class AccumulatingRoundingFloatingPointCounter: FloatingPointCoun
797
798
}
798
799
799
800
/// Wraps a RecorderHandler, adding support for incrementing values by storing an accumulated value and recording increments to the underlying CounterHandler after crossing integer boundaries.
800
-
internalfinalclassAccumulatingMeter:MeterHandler{
801
+
/// - Note: we can annotate this class as `@unchecked Sendable` because we are manually gating access to mutable state (i.e., the `value` property) via a Lock.
0 commit comments