Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^12: Consumes memory then crashs

by mbethke (Hermit)
on Mar 26, 2012 at 20:52 UTC ( [id://961744]=note: print w/replies, xml ) Need Help??


in reply to Re^11: Consumes memory then crashs
in thread Consumes memory then crashs

on the latest Strawberry
Ah! That's built with the gcc runtime isn't it!

Yes. If you insist, here's some uniq'd output from a freshly installed ActivePerl 5.14.2 which they tell me is built with VisualStudio:

$ uniq -c outfile | head -n25 682 Thread 2 1 Thread 2Thread 3 681 Thread 3 1 Thread 3Thread 4 681 Thread 4 1 Thread 4Thread 5 681 Thread 5 1 Thread 5Thread 1 681 Thread 1 1 Thread 1Thread 6 681 Thread 6 1 Thread 6Thread 7 681 Thread 7 1 Thread 7Thread 8 681 Thread 8 1 Thread 8Thread 9 681 Thread 9 1 Thread 9Thread 10 629 Thread 10 1 ThThread 11 629 Thread 11 1 ThThread 12 629 Thread 12 1 ThThread 13 629 Thread 13

If Perl's threading primitives' semantics were broken unless compiled with a runtime that <<10% of the installed Perls use, I'd still call Perl broken. If I can reproduce the bug on each an every Perl I look at though nobody seems to have complained about the primitives you use being buggy, chances are your Perl code is broken.

I don't know which it is, but it remains that I haven't seen a reliable threaded implementation yet. I for one would centralize the printing and use another Queue to feed back the results from the threads as at least the queue locking seems (as far as I've looked which is not very deep at all) to be working. But then again, why? I don't get the resistance against POE which fits on a floppy disk and is some 20kLOC without POD when common threading implementations are on the same order of magnitude (of rather more complex C code at that) and 20 MB of RAM are insignificant to you.

Replies are listed 'Best First'.
Re^13: Consumes memory then crashs
by BrowserUk (Patriarch) on Mar 26, 2012 at 20:59 UTC

    This is your 500-do-nothing-useful-threads-as-fast-as-you-can-with-no-attempt-to-solve-either-the-OPs-problem-or-work-out-what-you-are-doing-wrong code.

    Sorry, but I have neither time nor inclination to fence with someone who's purpose is anything but. to help.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      You missed the part where I provided a working implementation.
        I provided a working implementation

        To me, not to him.

        And an approach that relies on a 170+ module "framework" that requires a perl4-ish globals&call-backs style of programming that went out with the ark.

        And the OP has the choice of selecting your solution, or the mojo solution, or the threaded solution or the LWP::ParallelUA solution I also offered.

        If he elects to use the threaded solution, and encounters a problem with it and comes back, I'll help him solve it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://961744]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-25 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found