Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: memory leak with Thread::Queue ?

by BrowserUk (Patriarch)
on May 16, 2006 at 10:04 UTC ( [id://549703]=note: print w/replies, xml ) Need Help??


in reply to memory leak with Thread::Queue ?

Your code (slightly modified for win32), doesn't appear to leak under AS811/5.8.6 or AS817/5.8.8.

#!/usr/bin/perl use strict; use warnings; use threads; use Thread::Queue; my $queue = Thread::Queue -> new; threads -> create ("popper", $queue) -> detach for (1..10); my $message="this is a line of test around the right size"; while (1) { $queue -> enqueue ($message) for (1..100); sleep 1 while $queue -> pending; system qq[tasklist /nh /fi "PID eq $$"]; } sub popper { print "started a popper\n"; my $queue = shift; while ($queue -> dequeue) { print "."; } } __END__ C:\test>junk5 started a popper started a popper started a popper started a popper started a popper started a popper started a popper started a popper started a popper started a popper perl.exe 3128 0 6,936 +K perl.exe 3128 0 6,944 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K perl.exe 3128 0 6,948 +K

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: memory leak with Thread::Queue ?
by Anonymous Monk on Sep 18, 2009 at 22:04 UTC
    This problem is present on RHEL5 running 5.10.0, and RHEL5 running 5.10.1. It is NOT present on RHEL4 running 5.10.0. I don't understand why.

      I'd suggest you re-post this under dave_the_m's post above (or take it directly to p5p), as he understands the problem and is best place to suggest how to fix it.


      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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-23 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found