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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change postConstruct functions from asynchronous to synchronous #10788

Closed
paul-marechal opened this issue Feb 23, 2022 · 1 comment
Closed

change postConstruct functions from asynchronous to synchronous #10788

paul-marechal opened this issue Feb 23, 2022 · 1 comment
Labels
quality issues related to code and application quality

Comments

@paul-marechal
Copy link
Member

A problem in our code base is that some of those postConstruct functions return promises. Inversify won't wait on them, as the instance creation step assumes everything happens synchronously. This means that more often than not, by the time our asynchronously-post-constructed services are injected, dependents might try to call into uninitialized properties...

We can handle asynchronous processes in post-constructors, but it needs to be done with more care.

@msujew
Copy link
Member

msujew commented Jun 4, 2024

This was done with #12425.

@msujew msujew closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality issues related to code and application quality
Projects
None yet
Development

No branches or pull requests

2 participants