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

Add additional version of Resources #756

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cpvandehey
Copy link

It would be really useful to have a Resource type that is capable of having a sync init function with an async shutdown.

There are many scenarios where this is useful

Ex:

  1. Create an aiohttp client.
    session = aiohttp.ClientSession()

  2. Before closing the app, I want to await any hanging connections
    await session.close()

@cpvandehey cpvandehey changed the title Update resources.py Add additional version of Resources Oct 26, 2023
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.

1 participant