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

Late<T> #24

Open
MarkusPalcer opened this issue Dec 18, 2017 · 0 comments
Open

Late<T> #24

MarkusPalcer opened this issue Dec 18, 2017 · 0 comments
Milestone

Comments

@MarkusPalcer
Copy link
Owner

A way to resolve circular dependencies:
Late doesn't hold a value, when the consumers constructor is executed. Also no guarantee is given when it will to (only that it will do at some point).
For ease of use Late holds a Task and can also be awaited.

Implementation-wise after resolving all dependencies of a type, the normal resolution algorithm will check if a Late can be satisfied by the processed Factory or any of its dependencies.
If so, the crated provider will fill the Late after the constructor of the resolved type has finished.
If not the Late will become a dependency of the created provider.

@MarkusPalcer MarkusPalcer added this to the 2.1.0 milestone Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant