http://www.perlmonks.org?node_id=752290


in reply to Parallel::ForkManager and DBD::mysql, the easy way

You might also find this helpful as well (I know I did): DBI, fork, and clone.
  • Comment on Re: Parallel::ForkManager and DBD::mysql, the easy way

Replies are listed 'Best First'.
Re^2: Parallel::ForkManager and DBD::mysql, the easy way
by samtregar (Abbot) on Mar 21, 2009 at 20:28 UTC
    Nicely documented. Aside from the use of clone() instead of connect() this is pretty much the other option I mentioned, using InactiveDestroy to disable disconnect() on parent handles in the kid. My experience with doing it this way was not great - inevitably something in a child process would stumble on a parent handle and either try to use it or disconnect it. Either will cause unpredictable mayhem, which is the very worst kind.

    -sam

      Ya, you've got to keep track of your handles and where they're going to be used.