mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
[K/N][stdlib] Added @EagerInitialization annotation
It is needed in the lazy top level properties initialization strategy to revert to the previous strategy at least for the transition period
This commit is contained in:
@@ -58,6 +58,20 @@ public typealias ThreadLocal = kotlin.native.concurrent.ThreadLocal
|
||||
/** @suppress */
|
||||
public typealias SharedImmutable = kotlin.native.concurrent.SharedImmutable
|
||||
|
||||
/**
|
||||
* Forces a top-level property to be initialized eagerly, opposed to lazily on the first access to file and/or property.
|
||||
* This annotation can be used as temporal migration assistance during the transition from the previous Kotlin/Native initialization scheme "eager by default"
|
||||
* to the new one, "lazy by default".
|
||||
*
|
||||
* This annotation is intended to be used only as a temporal workaround and will be removed through the regular deprecation cycle as soon as the new initialization scheme will become the default one.
|
||||
* For the usages that cannot be emulated on the new initialization scheme without this annotation, it is strongly recommended to report them during the transition period, so the proper replacement can be introduced.
|
||||
*/
|
||||
@Target(AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@ExperimentalStdlibApi
|
||||
@Deprecated("This annotation is a temporal migration assistance and may be removed in the future releases, please consider filing an issue about the case where it is needed")
|
||||
public annotation class EagerInitialization
|
||||
|
||||
/**
|
||||
* Makes top level function available from C/C++ code with the given name.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user