Tell me please how to solve this problem.

Solve what problem?

Your code does nothing useful, so it is impossible to say how to improve it.

As for how long it takes to run, your figures seem about right to me.

Running over 1000 threads all thrashing a single domain with HEAD requests looks like a DoS attack to me? Even if the domain your using for testing is your own, who are you practicing for?

And if the point of your code is to see how many simultaneous thread you can run before you bog down your system then: Congratulations! You succeeded.

If you have a real problem to solve, that doesn't sound like a DoS or another of blatent misuse, then by all means describe that problem and you might get some further help.


Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.

In reply to Re: Problem with ithreads by BrowserUk
in thread Problem with ithreads by 2NetFly

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.