Hi Monks,

Seek your help on threads. Here is the problem description

We are working on threads to connect to remote systems parallelly using Net::SSH2 module and get some details and display them on a CGI page.

We had no problem when we deployed this script on Solaris9 (sparc) system. But when we ran the same script on linux system (RH ES3) the threads are not returning.

We are using Active perl in both Solaris and Linux. The Perl Version on linux ES3 system is '5.8.8 built for i689-linux-thread-multi'. Its binary build is 820 The Perl Version on Solaris system is '5.8.8 built for sun4-solaris-thread-multi'.Its binary build is 820 Code that I have used for threads is

foreach $key (@files) { push @threads, threads->new(\&Distribute, $ip, $host,$key) ; sleep(1); } while ( my $thread = shift @threads ) { $thread->join ; }

Can you suggest me how to proceed further with Linux system. Please tell me a better solution for this.

Thanks in advance,

Srinivas


In reply to Problem with threads on Linux ES3 by srinivas_rocks

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.