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/


Reply via email to