9 Oct
2006
9 Oct
'06
5:28 a.m.
On Sunday 08 October 2006 17:38, Jakub Wartak wrote:
I want to obtain unique identified of each CLONE, because the goal is to create DB connection for each CLONE for performance reasons, the DBI object/handle AFAIK shouldn't be shared.
Do it like that in main: our $dbh ; and then in CLONE sub CLONE { $dbh = DBI->connect("DBI:mysql:$database",$dbuser,$dbpass) or die $DBI::errstr; } then you will have number of connection equivalent to number of threads. Then in accouting, authenticate and so on just use $dbh and it should be unique per thread. -- Best Regards, Boian Jordanov SNE Orbitel - Next Generation Telecom tel. +359 2 4004 723 tel. +359 2 4004 002