Minor, clarify comment on SafePublicationLazyImpl.final
This commit is contained in:
@@ -90,7 +90,7 @@ private class SynchronizedLazyImpl<out T>(initializer: () -> T, lock: Any? = nul
|
|||||||
private class SafePublicationLazyImpl<out T>(initializer: () -> T) : Lazy<T>, Serializable {
|
private class SafePublicationLazyImpl<out T>(initializer: () -> T) : Lazy<T>, Serializable {
|
||||||
@Volatile private var initializer: (() -> T)? = initializer
|
@Volatile private var initializer: (() -> T)? = initializer
|
||||||
@Volatile private var _value: Any? = UNINITIALIZED_VALUE
|
@Volatile private var _value: Any? = UNINITIALIZED_VALUE
|
||||||
// this final field is required to enable safe publication of constructed instance
|
// this final field is required to enable safe initialization of the constructed instance
|
||||||
private val final: Any = UNINITIALIZED_VALUE
|
private val final: Any = UNINITIALIZED_VALUE
|
||||||
|
|
||||||
override val value: T
|
override val value: T
|
||||||
|
|||||||
Reference in New Issue
Block a user