LazyThreadSafetyMode
Specifies how a Lazy instance synchronizes initialization and publication among multiple threads. On platforms with no notion of synchronization and threads (JS and WASM), all modes are considered equal to the default implementation.
Since Kotlin
1.0See also
Entries
Link copied to clipboard
Uses a lock to ensure that only a single thread can initialize a Lazy instance, and ensures that initialized value is visible by all threads. The lock used is both platform- and implementation- specific detail.
Link copied to clipboard