Subject: | Automate disconnect_all on fork |
The documentation rightfully advises to call disconnect_all when forking, however it would
be even nicer to have this done automatically, if the performance penalty isn't too great.
Before doing any talk on the wire, would it be possible to have something like:
sub new {
...
return bless { ... , pid => $$ } $class;
}
then on any call, have this:
if ($self->{pid} != $$) {
$self->disconnect_all;
$self->{pid} = $$;
}
Thanks!