-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Right, but that's what InactiveDestroy is for. Otherwise when the child exits it will call DESTROY on the handle and close the parent's connection to the DB. Turning on InactiveDestroy in the child turns off the implicit call to disconnect from DESTROY for the inherited DB handle from the parent and thus should maintain the parent's connection. Only calling disconnect() from the child on the handle should disconnect the parent once InactiveDestroy is turned on.

At least that's what the DBI pod seems to say...

- -Aaron


On Nov 7, 2005, at 9:41 PM, louis gonzales wrote:

Given that, ALL children threads from a fork inherit the attributes of the parent, when you issue the undef from within the child, with a named handle, from the parent, it's likely that this disconnects that handle and ALL sibling threads also have the same, disconnected view.

When I was programming IPC channels, forks in UNIX for synchronous/ asynchronous communication, that's exactly how they behaved.

The $dbh from each of your child threads and parent see $dbh the same way. Again, because $dbh is a parent thread variable, it is inherited to each spawned thread.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDcD6tklVhPAXg8nARAlP5AKCVRX3yS6ctCrX1ZMo/BXUCIFx03ACgmbSt
bqTE006QIkOoWCUge+qam0c=
=RpJC
-----END PGP SIGNATURE-----

Reply via email to