You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Easy. Db connection for ex, which should be closed at the end, Indicator (specific device for translated messages) for ex should be closed before translator service and so on... (Imagine "GOOD BYE" for display for ukrainian when translation service already closed...)
Probably graph of the Fanalizable services should be sorted in reverse order?
Thanks!
So your Finalize object functions exec code that depends on the object's dependencies?
I guess that's legitimate.
The map being iterated isn't sorted tho. So it can't just iterate in reverse. It would probably have to keep another array around with the dependency order or capture reverse dependence and walk the tree.
Hi, Karl!
The question regarding the order (which in may case is very important) during executing Finalize funcs at the end of an app. So, the code:
Above snippet of code initializes and executes successfully, but at the end of the application inject calls Finalizable funcs in random order...
First run:
Next run:
So, do you have some suggestions or recommendations?
Thanks!
The text was updated successfully, but these errors were encountered: