Please reply to the list. Regards,
Shlomi Fish Begin forwarded message: Date: Mon, 15 Oct 2012 21:20:02 +0800 From: xiyoulaoyuanjia <xiyoulaoyuan...@gmail.com> To: Shlomi Fish <shlo...@shlomifish.org> Subject: Re: thread error is there a way for some threads using the same *Net::SSH::Perl* connection 2012/10/15 Shlomi Fish <shlo...@shlomifish.org> > Hi, > > On Mon, 15 Oct 2012 19:48:46 +0800 > xiyoulaoyuanjia <xiyoulaoyuan...@gmail.com> wrote: > > > hi listers: > > now i have a question is abort thread > > i have a main process that have ssh a remote host and everything is > > ok! but when i use thread it have a error like that > > --------------------------------- > > Thread 1 terminated abnormally: DBD::mysql::db do failed: handle 2 > > is owned by thread 1182010 not current thread 1e3fa20 (handles > > can't be shared between threads and your driver may need a CLONE > > method added) at 。。 > > ------------------------------- > > The error pretty much speaks for itself. You initialised a database > handle in one thread and are using it in another, which DBD::mysql > does not allow. > > You should also reconsider using thread in Perl. See: > > <perlbot> rindolf: threads.pm is evil, please explain what you're > trying to write so we can help you find a better way (see > http://www.perlmonks.org/index.pl?node_id=288022 for details on > "evil") > > Regards, > > Shlomi Fish > > -- > ----------------------------------------------------------------- > Shlomi Fish http://www.shlomifish.org/ > The Case for File Swapping - http://shlom.in/file-swap > > Knuth is not God! God has already released TeX version 4.0. > > Please reply to list if it's a mailing list post - > http://shlom.in/reply . > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > -- 继续上路。。 you can follow me at twitter @xiyoulaoyuanjia -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ The Case for File Swapping - http://shlom.in/file-swap All Chuck Norris has to do is *look* at Perl code and it interprets itself out of fear and respect. — DrForr Please reply to list if it's a mailing list post - http://shlom.in/reply .
-- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/