LazyThreadSafetyMode

enum LazyThreadSafetyMode : Enum<LazyThreadSafetyMode>

Specifies how a Lazy instance synchronizes initialization among multiple threads.

Entries

NONE
Link copied to clipboard

No locks are used to synchronize an access to the Lazy instance value; if the instance is accessed from multiple threads, its behavior is undefined.

PUBLICATION
Link copied to clipboard

Initializer function can be called several times on concurrent access to uninitialized Lazy instance value, but only the first returned value will be used as the value of Lazy instance.

SYNCHRONIZED
Link copied to clipboard

Locks are used to ensure that only a single thread can initialize the Lazy instance.

Properties

name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int