connection_pool/test
Jean byroot Boussier 428c06f342
Automatically drop all connections after fork (#166)
* Automatically drop all connections after fork

Fix: https://github.com/mperham/connection_pool/issues/165

Using connections inherited from a parent process can have
very nasty consequences and it's pretty much never desired.

This patch use the `Process._fork` API added in Ruby 3.1 to
automatically detect when a fork is happening, and when it
does, drop all existing connections.

* after_fork callback: keep instances in a weakref set

This is much faster than relying on `ObjectSpace.each_object`

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2022-10-04 07:01:56 -07:00
..
helper.rb Integrate standard gem, code formatting fixes, no functional changes 2020-06-02 13:29:59 -07:00
test_connection_pool.rb Automatically drop all connections after fork (#166) 2022-10-04 07:01:56 -07:00
test_connection_pool_timed_stack.rb Add more context to timeout error 2022-09-15 12:51:35 -07:00