Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: Postpone garbage collection during a child process run?

by flexvault (Parson)
on Oct 06, 2010 at 22:41 UTC ( #863879=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Postpone garbage collection during a child process run?
in thread Postpone garbage collection during a child process run?

"What you describe is not what happens."

So you are calling me a liar?

"You have a subroutine which triggers some action at a distance, namely, cleaning out a hash."

Did I ever say this?   No!

The top most subroutine does creation, modification, and destruction! All subroutines called use the hash for reference only. The subroutines use it to build html only. A static, read-only hash should not disappear!

Your assumptions are just that -- ASSumptions.

You want what I would like to have, a very small script that produced the problem. Life should be so simple.

Perl has no processes running asynchronously to your program. There is no "garbage collection" process, and memory allocated to Perl data structures is only released when there is nothing more (in Perl space) referencing it.

Thank you, I now can rule out 'processes running asynchronously'. You have finally said something of merit.

Note: I have tried to ask intelligent, courteous and accommodating questions to this qroup. I don't know what I did to have such an aggressive response, maybe some-one is having a "bad hair day", but please if you don't understand the question, or you can't grasp the complexity of the problem, just don't respond!

20101011 Janitored by Corion: Closed bold tag, as per Writeup Formatting Tips


Comment on Re^4: Postpone garbage collection during a child process run?
Re^5: Postpone garbage collection during a child process run?
by Anonymous Monk on Oct 07, 2010 at 07:14 UTC
    "What you describe is not what happens." So you are calling me a liar?

    No, Corion did not call you a liar. He did not even call you mistaken, confused.... what you describe is simply not how perl works, sorry.

    "You have a subroutine which triggers some action at a distance, namely, cleaning out a hash." Did I ever say this? No!

    Actually, that is exactly what you described, sorry.

    A static, read-only hash should not disappear!

    Can you show an example (real perl code) that creates a static read-only hash? I'll be happy to show at least two ways it can disappear (no c voodoo, just regular perl code).

    Your assumptions are ...Life should be so simple.

    Sure, someone with over 10 years experience could make bad assumptions, but we only have your descriptions as source material.

    Note: I have tried to ask intelligent, courteous and accommodating questions to this qroup. I don't know what I did to have such an aggressive response, maybe some-one is having a "bad hair day", but please if you don't understand the question, or you can't grasp the complexity of the problem, just don't respond!

    Please see http://perl5.git.perl.org/perl.git?a=search&h=blead&st=free&s=Corion. We've all been there, but try to remember the golden rule.

    PS perlmonks users have the option of using various themes so using colors doesn't always work out, see Writeup Formatting Tips

      Thank you for replying and in such a calm manner. You point out my "contributions" to the Perl core, but I have to admit I don't see them as being that great contributions, as the 15 comments/patches mostly are about fixing building Perl on Windows or test fixes. I don't meddle much with the Perl internals.

Re^5: Postpone garbage collection during a child process run?
by Corion (Pope) on Oct 07, 2010 at 07:36 UTC

    I'm not calling you a liar. You seem to be just mistaken about what you observe, which is what I point out. There is no need to shout about this or use colorfull responses. If you want to continue to believe what you believe now, you can do that. I just don't think that this belief will bring you closer to a solution to your problems.

    If you don't like the assumptions I make about your code, maybe you can help me by showing more of your real code instead of your interpretation of your code? I think we are both convinced that your code does not behave as it should. You already have looked at your code and found no fault, yet there is a fault. Why do you think that your description of what you saw is accurate, as you did not see the fault? Of course, as I already told you, finding a small script that produces the problem is hard work. But if you don't want to do this work yourself, who else is supposed to do it?

    I think I can grasp the complexity of the problem quite well. My approach tries to reduce the complexity of the problem, but so far all I hear from you is "It's just too complex". This is not an approach that I think will lead to a solution.

    You seem to have a lot of misconceptions about how Perl works internally, yet you seem very eager to blame your problems on how Perl and your operating system works. I can only suggest familiarizing yourself with the programming concepts you're employing and with some testing strategy that allows you to eliminate the potential points one by one. For example, you could have easily ruled out fork-parallelism as a source of potential problems by reading up on fork() or by simply running your processes in a serial fashion.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2014-09-21 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (168 votes), past polls