Hey, thanks for the concern. I looked at pg's code and i must admit i'm still confused. To me it looks like it's doing what I need it to but hanging after having launched 1020 or so threads. What i'm doing is downloading small chunks of data from the internet. I'm on a fairly fast link, but if I try to do the proccess in serial, it takes ages because of waiting for http request/response. So, i'm launching b/ween 50-100 seperate threads to do the task, this way i'm finding i can make better use of my bandwidth. The plan is to have X number of workers sitting there downloading these small chunks of data, when one of them finishes, a new worker is created to take it's place. What i'm trying to do is probably not the best way to do it, but as I said, it's working nicely apart from hanging after having created 1020 threads. Thanks for your help!

In reply to Re: Re: ^3: Fun with threads by znu
in thread Fun with threads by znu

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.