develooper Front page | perl.perl5.porters | Postings from January 2017

RE: [perl #130649] Threads, shared memory, blessed objects fail tocall ->DESTROY method

Thread Next
From:
"Burns, Victor M" via perl5-porters
Date:
January 26, 2017 15:56
Subject:
RE: [perl #130649] Threads, shared memory, blessed objects fail tocall ->DESTROY method
Message ID:
B0C23573B268484A8C732E3C1C2A105E011A6608@smtp_mail.bankofamerica.com
Yes, when it works properly each of the constructed objects should announce its demise when the ->DESTROY method is called. When script is run as given OR modified in some of the other suggested ways the results will vary including the possibility that none of the objects will announce their demise.

Best Regards,

Victor Burns | TG Application Architect / Developer & Perl GURU
AVP, Consultant II System Engineer, Bank of America
T 469.201.8375 | victor.burns@bankofamerica.com
16001 N Dallas Pkwy, Addison, TX 75001

  Like us on Facebook
  Follow us on Twitter

Life’s better when we’re connected™
 


-----Original Message-----
From: James E Keenan via RT [mailto:perlbug-followup@perl.org] 
Sent: Thursday, January 26, 2017 8:28 AM
To: Burns, Victor M <victor.burns@bankofamerica.com>
Subject: [perl #130649] Threads, shared memory, blessed objects fail to call ->DESTROY method

I would like to confirm the output one is supposed to get from running this program.

Running the program as submitted (which, for convenience, I am attaching to this RT), I get:

#####
[threaded_blead] $ ./bin/perl -Ilib ~/learn/perl/p5p/130649-threads.pl
Hello World!, - Perl shared memory failure to call ->DESTROY detector.
# Lazy::Crazy 'b' is destroyed
#####

Uncommenting lines 34-36 -- the last 3 lines of the 'LEAKER' block -- and then running the program I get:

#####
[threaded_blead] $ ./bin/perl -Ilib ~/learn/perl/p5p/130649-threads.pl
Hello World!, - Perl shared memory failure to call ->DESTROY detector.
# Lazy::Crazy 'b' is destroyed
# Lazy::Crazy 'a' is destroyed
# Lazy::Crazy 'c' is destroyed
#####

Is that the output you were expecting?

Thank you very much.

-- 
James E Keenan (jkeenan@cpan.org)

----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended recipient, please delete this message.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About