https://kotlinlang.org logo
#javascript
Title
# javascript
p

PHondogo

11/21/2023, 8:56 AM
Does main function supposed to be invoked only after all @EagerInitialization properties will be initialized?
a

Artem Kobzar

11/21/2023, 10:49 AM
Could you please describe your needs in the YouTrack ticket, and we will discuss such of initialization order
p

PHondogo

11/21/2023, 10:59 AM
I'm just asking if there is such agreement. My use case is that all @EagerInitialization properties while initialized put some data to global registry. In main method I need to be sure that all data is in registry.
If there is no such agreement then where in YouTrack can I find such discussion?
a

Artem Kobzar

11/21/2023, 1:04 PM
But, why do you use @EagerInitialization in this case? All the regular properties should be initialized before the main function call
p

PHondogo

11/21/2023, 1:09 PM
Without it properties not initialized before explicit invoke. I'm using this for some kind of service loaders from dependencies.
a

Artem Kobzar

11/21/2023, 3:53 PM
I've just checked and @EagerInitialization should also be ran before the
main
function call
Is there any async call inside your EgaerInitialization?
p

PHondogo

11/21/2023, 3:54 PM
Thanks! Then it is ok!
Only sync.
Just put data to global map.