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
There are no similar issues or pull requests for this yet.
I discussed this idea on the community chat and feedback is positive.
Is your feature related to a problem? Please describe.
Currently the lifespan task runs in a sibling task to any request tasks, but a number of use cases require wrapping a context manager around all the request tasks, eg:
Checklist
Is your feature related to a problem? Please describe.
Currently the lifespan task runs in a sibling task to any request tasks, but a number of use cases require wrapping a context manager around all the request tasks, eg:
Describe the solution you would like.
support app factories like this:
or :
or including the
__aenter__/__aexit__directly on the app instance:Describe alternatives you considered
run lifespan as a parent task to all the request tasks
Additional context
see https://gitter.im/encode/community?at=610989bc8fc359158c4f959e
Important