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

Join dependency execution paths before executing #3669

Closed
wants to merge 1 commit into from

Conversation

adriangb
Copy link
Contributor

@adriangb adriangb commented Aug 7, 2021

This goes hand in hand with encode/starlette#1260

The idea is to defer all execution and binding of arguments to dependencies to a central place using a series of closures/wrappers.

This provides better separation of the responsibilities of the DI system (executing the dependency w/ it's values) from concurrency management (binding sync deps to a thread pool, managing contexts, etc). I think evidence to this is that this system can be annotated to carry dependency return type information through all of the wrapping (see here).

This change should be 100% backwards compatible (unless we remove the now unused contextmanager_in_threadpool method, in which case this would not be backwards compatible, but it would be an easy fix for users).

@adriangb
Copy link
Contributor Author

Since this likely won't get merged, I'm going to close those to avoid contributing to PR pile up

@adriangb adriangb closed this Dec 16, 2021
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

Successfully merging this pull request may close these issues.

None yet

1 participant