We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e2d5dd commit 30dd24eCopy full SHA for 30dd24e
Tests/W3CTraceContextTests/IncrementingRandomNumberGenerator.swift
@@ -15,14 +15,14 @@
15
import Dispatch
16
17
/// A random number generator starting at 0 and incrementing by 1 for each generated number.
18
-final class IncrementingRandomNumberGenerator: RandomNumberGenerator, Sendable {
+final class IncrementingRandomNumberGenerator: RandomNumberGenerator, @unchecked Sendable {
19
func next() -> UInt64 {
20
defer { valueQueue.sync { _value += 1 } }
21
return valueQueue.sync { _value }
22
}
23
24
// MARK: - Private
25
26
- private nonisolated(unsafe) var _value: UInt64 = 0
+ private var _value: UInt64 = 0
27
private let valueQueue = DispatchQueue(label: "value")
28
0 commit comments