Deprecate lazy() that synchronizes on a given lock in non-JVM platforms
Because the overload has a meaningful implementation only in JVM. In other platforms the specified lock object is ignored. In K/N it throws UnsupportedOperationException.
This commit is contained in:
committed by
Space Team
parent
9864402cf8
commit
7d9ea28604
@@ -114,6 +114,8 @@ public inline fun error(message: kotlin.Any): kotlin.Nothing
|
||||
/*∆*/
|
||||
public fun <T> lazy(initializer: () -> T): kotlin.Lazy<T>
|
||||
|
||||
@kotlin.Deprecated(message = "Synchronization on Any? object is not supported.", replaceWith = kotlin.ReplaceWith(expression = "lazy(initializer)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.9")
|
||||
public fun <T> lazy(lock: kotlin.Any?, initializer: () -> T): kotlin.Lazy<T>
|
||||
|
||||
public fun <T> lazy(mode: kotlin.LazyThreadSafetyMode, initializer: () -> T): kotlin.Lazy<T>
|
||||
|
||||
@@ -84,6 +84,8 @@ public inline fun error(message: kotlin.Any): kotlin.Nothing
|
||||
|
||||
public fun <T> lazy(initializer: () -> T): kotlin.Lazy<T>
|
||||
|
||||
@kotlin.Deprecated(message = "Synchronization on Any? object is not supported.", replaceWith = kotlin.ReplaceWith(expression = "lazy(initializer)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.9")
|
||||
public fun <T> lazy(lock: kotlin.Any?, initializer: () -> T): kotlin.Lazy<T>
|
||||
|
||||
public fun <T> lazy(mode: kotlin.LazyThreadSafetyMode, initializer: () -> T): kotlin.Lazy<T>
|
||||
|
||||
Reference in New Issue
Block a user