Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumKotlinproperty delegation lazySingle-choice MCQ

Two threads call `value` for the first time at the same moment. With `LazyThreadSafetyMode.PUBLICATION`, what is guaranteed?

val value: String by lazy(LazyThreadSafetyMode.PUBLICATION) { compute() }