sameerperl has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Can anyone give explaination..
by moritz (Cardinal) on Jun 30, 2008 at 08:59 UTC
      Of course, the error is in line 42 of your code.

      Wrong! It is on Line 17.

      ;-)

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

        Oh please! Everyone knows the answer is 42!

        Ah, hold on. What was the question?


        Perl is environmentally friendly - it saves trees
Re: Can anyone give explaination..
by zentara (Cardinal) on Jun 30, 2008 at 15:24 UTC
    To translate 42 into readable english.......:-)

    You don't have your threads setup right with the Net::SSH2 object. Threads are a tricky business, and you can't just throw code into thread code blocks and expect it to work, especially when modules(especially complex networking types) are thrown into the soup.

    Threads get copies of the parent when spawned, and some objects are not thread safe.

    But from your errors, you may just need to manually close the SSH2 object, before thread destruction. As always, show some code.


    I'm not really a human, but I play one on earth CandyGram for Mongo