diff --git a/Sources/Lockman/Composable/LockmanComposableMacros.swift b/Sources/Lockman/Composable/LockmanComposableMacros.swift index c0757d15c..9d470bbc6 100644 --- a/Sources/Lockman/Composable/LockmanComposableMacros.swift +++ b/Sources/Lockman/Composable/LockmanComposableMacros.swift @@ -187,7 +187,7 @@ public macro LockmanGroupCoordination() = /// LockmanCompositeInfo2( /// actionId: actionName, /// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: actionName, mode: .boundary), -/// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: actionName, priority: 100) +/// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: actionName, priority: .high(.exclusive)) /// ) /// } /// } diff --git a/Sources/Lockman/Core/Debug/LockmanLogger.swift b/Sources/Lockman/Core/Debug/LockmanLogger.swift index 4c1ff35ba..f518e9f11 100644 --- a/Sources/Lockman/Core/Debug/LockmanLogger.swift +++ b/Sources/Lockman/Core/Debug/LockmanLogger.swift @@ -4,7 +4,7 @@ import OSLog /// Debug logger for Lockman output. /// /// Provides thread-safe logging functionality for lock operations. -/// Only active in DEBUG builds to avoid performance impact in production. +/// Optimized for DEBUG builds with fallback functionality in production builds. @_spi(Logging) public final class LockmanLogger: @unchecked Sendable { // MARK: - Singleton diff --git a/Sources/Lockman/Core/Protocols/LockmanInfo.swift b/Sources/Lockman/Core/Protocols/LockmanInfo.swift index 6d02b79ef..2113c7186 100644 --- a/Sources/Lockman/Core/Protocols/LockmanInfo.swift +++ b/Sources/Lockman/Core/Protocols/LockmanInfo.swift @@ -19,10 +19,10 @@ import Foundation /// ## Examples /// ```swift /// // Single execution info -/// let singleInfo = LockmanSingleExecutionInfo(actionId: "login") +/// let singleInfo = LockmanSingleExecutionInfo(actionId: "login", mode: .boundary) /// /// // Priority-based info -/// let priorityInfo = LockmanPriorityBasedInfo(actionId: "sync", priority: .high(.preferLater)) +/// let priorityInfo = LockmanPriorityBasedInfo(actionId: "sync", priority: .high(.exclusive)) /// ``` public protocol LockmanInfo: Sendable, CustomDebugStringConvertible { /// The strategy identifier that created this lock info. diff --git a/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeAction.swift b/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeAction.swift index b7d8c79d7..98d3d30c5 100644 --- a/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeAction.swift +++ b/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeAction.swift @@ -17,7 +17,7 @@ /// func createLockmanInfo() -> LockmanCompositeInfo2 { /// LockmanCompositeInfo2( /// actionId: actionName, -/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: actionName), +/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: actionName, mode: .boundary), /// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: actionName, priority: .high(.exclusive)) /// ) /// } diff --git a/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeInfo.swift b/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeInfo.swift index b893b24ed..56965168b 100644 --- a/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeInfo.swift +++ b/Sources/Lockman/Core/Strategies/CompositeStrategy/LockmanCompositeInfo.swift @@ -12,7 +12,7 @@ import Foundation /// ```swift /// let compositeInfo = LockmanCompositeInfo2( /// actionId: "userLogin", -/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: "userLogin"), +/// lockmanInfoForStrategy1: LockmanSingleExecutionInfo(actionId: "userLogin", mode: .boundary), /// lockmanInfoForStrategy2: LockmanPriorityBasedInfo(actionId: "userLogin", priority: .high(.exclusive)) /// ) /// ``` diff --git a/Sources/Lockman/Core/Strategies/GroupCoordinationStrategy/LockmanGroupCoordinatedAction.swift b/Sources/Lockman/Core/Strategies/GroupCoordinationStrategy/LockmanGroupCoordinatedAction.swift index caad9cb85..e7333c5a6 100644 --- a/Sources/Lockman/Core/Strategies/GroupCoordinationStrategy/LockmanGroupCoordinatedAction.swift +++ b/Sources/Lockman/Core/Strategies/GroupCoordinationStrategy/LockmanGroupCoordinatedAction.swift @@ -11,7 +11,7 @@ import Foundation /// // Navigation leader action /// struct NavigateToDetailAction: LockmanGroupCoordinatedAction { /// let groupId = "navigation" -/// let coordinationRole = LockmanGroupCoordinationRole.leader(.none) +/// let coordinationRole = LockmanGroupCoordinationRole.leader(.emptyGroup) /// /// var actionName: String { "navigateToDetail" } /// } @@ -55,7 +55,7 @@ import Foundation /// var coordinationRole: LockmanGroupCoordinationRole { /// switch self { /// case .startLoading: -/// return .leader(.none) +/// return .leader(.emptyGroup) /// case .updateProgress, .showError: /// return .member /// } diff --git a/Sources/Lockman/Core/Strategies/PriorityBasedStrategy/LockmanPriorityBasedAction.swift b/Sources/Lockman/Core/Strategies/PriorityBasedStrategy/LockmanPriorityBasedAction.swift index 70e3c43db..e371f2fd0 100644 --- a/Sources/Lockman/Core/Strategies/PriorityBasedStrategy/LockmanPriorityBasedAction.swift +++ b/Sources/Lockman/Core/Strategies/PriorityBasedStrategy/LockmanPriorityBasedAction.swift @@ -13,7 +13,7 @@ /// let actionName = "login" /// /// func createLockmanInfo() -> LockmanPriorityBasedInfo { -/// priority(.high(.preferLater)) +/// priority(.high(.exclusive)) /// } /// } /// ``` @@ -53,7 +53,7 @@ extension LockmanPriorityBasedAction { /// Example usage: /// ```swift /// func createLockmanInfo() -> LockmanPriorityBasedInfo { - /// priority(.high(.preferLater)) + /// priority(.high(.exclusive)) /// } /// ``` public func priority(_ priority: LockmanPriorityBasedInfo.Priority) -> LockmanPriorityBasedInfo { @@ -74,7 +74,7 @@ extension LockmanPriorityBasedAction { /// Example usage: /// ```swift /// func createLockmanInfo() -> LockmanPriorityBasedInfo { - /// priority("_user123", .high(.preferLater)) + /// priority("_user123", .high(.exclusive)) /// } /// ``` public func priority(