Commit 749542e
committed
Faster shutdown of pgxpool.Pool background goroutines
When a pool is closed, some background goroutines may be left open,
particularly for health checks as detailed in #1641. Two specific
examples have been refactored here to avoid a blocking sleep and instead
also select on the pool being closed to potentially return/continue
sooner.1 parent dc94db6 commit 749542e
1 file changed
Lines changed: 24 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
381 | 384 | | |
382 | 385 | | |
383 | 386 | | |
384 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
385 | 393 | | |
386 | 394 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
393 | 406 | | |
394 | 407 | | |
395 | 408 | | |
| |||
408 | 421 | | |
409 | 422 | | |
410 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
411 | 427 | | |
412 | 428 | | |
413 | 429 | | |
| |||
424 | 440 | | |
425 | 441 | | |
426 | 442 | | |
427 | | - | |
| 443 | + | |
428 | 444 | | |
429 | 445 | | |
430 | 446 | | |
| |||
0 commit comments