jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
However, this is what happens when I run the code:..... init stuff ...... my $db = DBI->connect(.....) my $manage = MyPackage->new( $db ) ; ..... end init stuff ..... ..... usage ....... push @threads, new Thread \&start_thread, $manage ; .....
So, I cannot share the database connection, right ?thread failed to start: DBD::mysql::db quote failed: handle 2 is owned + by thread 8166008 not current thread 9178d90 (handles can't be share +d between threads and your driver may need a CLONE method added) at / +usr/lib/perl5........
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: share MySQL resources among threads
by BrowserUk (Patriarch) on Sep 06, 2007 at 10:46 UTC | |
by jeanluca (Deacon) on Sep 06, 2007 at 11:39 UTC | |
by renodino (Curate) on Sep 06, 2007 at 20:19 UTC | |
by BrowserUk (Patriarch) on Sep 06, 2007 at 11:43 UTC | |
|
Re: share MySQL resources among threads
by Anonymous Monk on Sep 06, 2007 at 10:49 UTC | |
by moritz (Cardinal) on Sep 06, 2007 at 11:33 UTC | |
by Anonymous Monk on Sep 06, 2007 at 13:18 UTC |