threadLocal

expect fun <T : Any> threadLocal(value: T): ReadOnlyProperty<Any, T?>

Allow to create thread local reference without freezing. Please note that reference is thread-local only in kotlin-native. Otherwise it will be simple value reference.

It will have value in creation thread and null otherwise.

actual fun <T : Any> threadLocal(value: T): ReadOnlyProperty<Any, T?>

Allow to create thread local reference without freezing. Please note that reference is thread-local only in kotlin-native. Otherwise it will be simple value reference.

This reference is allowed to use only from creation thread. Otherwise it will return null.

actual fun <T : Any> threadLocal(value: T): ReadOnlyProperty<Any, T?>

Allow to create thread local reference without freezing. Please note that reference is thread-local only in kotlin-native. Otherwise it will be simple value reference.

This reference is allowed to use only from creation thread. Otherwise it will return null.