-
Notifications
You must be signed in to change notification settings - Fork 98
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
Handle with AioPool #221
Comments
|
The pool can be connected(created) automatically only once now. If somebody close the pool he has to create it again manually otherwise he has pool is closed exception
It is possible if forbid the min_connection option and set it as 0 by default. But it is not flexible.
It is strange to continue acquire connection after you have closed the pool. So as i said a programmer should create the pool manually. So the double check does not need.
It lays to a programmer to manage the pool now after he has closed it
None is not assigned to the pool variable after closing. But it is not possible to acquire a connection after closing until you call pool.create() manually |
На данный момент AioPool выполняет роль адаптера для возможности использовать различные пулы(aiopg, aiomysql, в перспективе psycopg3) а также в нём есть функционал автоматического создания пула при первом получении connect-а, метода acquire. Вопросы:
if self.pool is None
это сделано для того, чтобы не использовать блокировку в aсquire без необходимости. Нельзя ли сделать этот код более "красивым"? Не подойдет ли condition для этого случая?The text was updated successfully, but these errors were encountered: