Minor, clarify comment on SafePublicationLazyImpl.final

This commit is contained in:
Alexander Udalov
2019-10-23 16:28:20 +02:00
parent c24f2d06d4
commit c676a30919
@@ -90,7 +90,7 @@ private class SynchronizedLazyImpl<out T>(initializer: () -> T, lock: Any? = nul
private class SafePublicationLazyImpl<out T>(initializer: () -> T) : Lazy<T>, Serializable {
@Volatile private var initializer: (() -> T)? = initializer
@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
override val value: T