Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'isInitializing' property so we're able to detect init() was already called. #2141

Closed
koenvd opened this issue Feb 20, 2024 · 4 comments
Closed

Comments

@koenvd
Copy link

koenvd commented Feb 20, 2024

馃殌 Feature Proposal

I understood from different other issues we should not call the init function of the service twice.

However it would be nice the service would have an isInitializing property indicating init() was called and is not yet finished (what the isInitialized property is telling us).

We can then use that property to decide if we no longer are allowed to call the init method but just have to wait instead on the initialized event to detect when the service finished intializing.

Motivation

There's still some time between calling init and the service becoming initialized. In that time interval an isInitializing property would help to know we no longer can call init.

Now we need to keep track of this ourself outside this service which is a bit painful.

@koenvd koenvd changed the title Add 'isInitialzing' property so we're able to detect init() was already called. Add 'isInitializing' property so we're able to detect init() was already called. Feb 20, 2024
@adrai
Copy link
Member

adrai commented Feb 20, 2024

Feel free to suggest a PR

adrai added a commit that referenced this issue Feb 22, 2024
@adrai
Copy link
Member

adrai commented Feb 22, 2024

included in v23.10.0

@adrai adrai closed this as completed Feb 22, 2024
@koenvd
Copy link
Author

koenvd commented Feb 22, 2024

Waw. Awesome @adrai !! Thanks for the fix.

@adrai
Copy link
Member

adrai commented Feb 22, 2024

If you like this module don鈥檛 forget to star this repo. Make a tweet, share the word or have a look at our https://locize.com to support the devs of this project.

There are many ways to help this project 馃檹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants