@@ -476,7 +476,7 @@ extension UUIDV7 {
476476
477477// MARK: - Lock
478478
479- private struct Lock < State> {
479+ struct _UUIDV7Lock < State> {
480480 private let buffer : ManagedBuffer < State , PlatformLock . Primitive >
481481
482482 init ( _ initial: State ) {
@@ -487,15 +487,15 @@ private struct Lock<State> {
487487 }
488488}
489489
490- extension Lock {
490+ extension _UUIDV7Lock {
491491 private final class LockedBuffer : ManagedBuffer < State , PlatformLock . Primitive > {
492492 deinit {
493493 self . withUnsafeMutablePointerToElements { PlatformLock . deinitialize ( $0) }
494494 }
495495 }
496496}
497497
498- extension Lock {
498+ extension _UUIDV7Lock {
499499 func withLock< R> ( _ critical: ( inout State ) throws -> sending R) rethrows -> R {
500500 try self . buffer. withUnsafeMutablePointers { header, lock in
501501 PlatformLock . lock ( lock)
@@ -506,7 +506,7 @@ extension Lock {
506506}
507507
508508// NB: This is safe because all mutable state is accessed only while holding `PlatformLock`.
509- extension Lock : @unchecked Sendable where State: Sendable { }
509+ extension _UUIDV7Lock : @unchecked Sendable where State: Sendable { }
510510
511511// MARK: - PlatformLock
512512
@@ -584,7 +584,7 @@ private enum PlatformLock {
584584
585585/// See https://www.rfc-editor.org/rfc/rfc9562.html#section-6.2-5.1
586586private struct MonotonicityState : Sendable {
587- static let current = Lock ( Self ( ) )
587+ static let current = _UUIDV7Lock ( Self ( ) )
588588
589589 private var previousTimestamp = UInt64 ( 0 )
590590 private var sequence = UInt16 ( 0 )
@@ -620,7 +620,7 @@ extension MonotonicityState {
620620// MARK: - RandomUUIDBytesGenerator
621621
622622private struct RandomUUIDBytesGenerator {
623- static nonisolated ( unsafe) let shared = Lock ( Self ( ) )
623+ static nonisolated ( unsafe) let shared = _UUIDV7Lock ( Self ( ) )
624624
625625 private static let cacheSize = 256
626626
0 commit comments