Open the pool by starting connecting and and accepting clients. If *wait* is `!False`, return immediately and let the background worker fill the pool if `min_size` > 0. Otherwise wait up to *timeout* seconds for the requested number of connections to be ready (see `wait()` f
(self, wait: bool = False, timeout: float = 30.0)
| 372 | return True |
| 373 | |
| 374 | def open(self, wait: bool = False, timeout: float = 30.0) -> None: |
| 375 | """Open the pool by starting connecting and and accepting clients. |
| 376 | |
| 377 | If *wait* is `!False`, return immediately and let the background worker |
| 378 | fill the pool if `min_size` > 0. Otherwise wait up to *timeout* seconds |
| 379 | for the requested number of connections to be ready (see `wait()` for |
| 380 | details). |
| 381 | |
| 382 | It is safe to call `!open()` again on a pool already open (because the |
| 383 | method was already called, or because the pool context was entered, or |
| 384 | because the pool was initialized with *open* = `!True`) but you cannot |
| 385 | currently re-open a closed pool. |
| 386 | """ |
| 387 | |
| 388 | with self._lock: |
| 389 | self._open() |
| 390 | |
| 391 | if wait: |
| 392 | self.wait(timeout=timeout) |
| 393 | |
| 394 | def _open(self) -> None: |
| 395 | if not self._closed: |