|
|
|
|
|
by youknowone
2584 days ago
|
|
This is a good point. asyncio backends now partially take an initializer function because calling await at importing time is a kind of non-sense. I think it needs to take also a client-configuration or a client initializer. Any advice from your use case? |
|
The async with block is a nice idea but doesn't deal with the reality that often a resource has multiple consumers. For instance, there might be several components of an application that use a database connection -- I really want to make the connection once and tear it down only after all of the clients of that connection have themselves been torn down.
What I'm imagining the answer to be is something a little bit like the Spring Framework but fundamentally centered around asyncio.