withLockIfAvailable(_:) Declarationfunc withLockIfAvailable<R>(_ body: @Sendable (inout State) throws -> R) rethrows -> R? where R : Sendable