in reply to Re^4: Isolating dynamically loaded modules with Thread::Isolate.
in thread Isolating dynamically loaded modules with Thread::Isolate.

This is what I got from your script above:

P:\test>426324 GOT PAGE: 61833 bytes GOT PAGE: 61456 bytes INC: AutoLoader.pm Carp.pm Config.pm DynaLoader.pm Exporter.pm Exporter/Heavy.pm Fcntl.pm Storable.pm Thread/Isolate.pm XSLoader.pm attributes.pm c:/Perl/lib/auto/Storable/_freeze.al c:/Perl/lib/auto/Storable/autosplit.ix c:/Perl/lib/auto/Storable/freeze.al overload.pm strict.pm threads.pm threads/shared.pm vars.pm warnings.pm warnings/register.pm (in cleanup) Can't call method "PUSH" on an undefined value at + c:/Perl/site/lib/Thread/Isolate.pm line 224 during global destructio +n.

And this is what I got from my equivalent:

P:\test>426297 GOT PAGE: 61637 bytes GOT PAGE: 61585 bytes AutoLoader.pm Carp.pm Config.pm DynaLoader.pm Exporter.pm overload.pm strict.pm threads.pm vars.pm warnings.pm warnings/register.pm

Rather less loaded?

The script I used was:

#! perl -slw use strict; use threads qw[ async ]; my $thr = async { require LWP::Simple; return LWP::Simple::get( 'http://www.perlmonks.com/' ); }; print 'GOT PAGE: ', length $thr->join, ' bytes'; $thr = async { require LWP::Simple; return LWP::Simple::get( 'http://www.perlmonks.com/' ); }; print 'GOT PAGE: ', length $thr->join, ' bytes'; print for sort keys %INC;

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

Replies are listed 'Best First'.
Re^6: Isolating dynamically loaded modules with Thread::Isolate.
by gmpassos (Priest) on Jan 30, 2005 at 01:58 UTC
    Ok, now get your code and put it as a module and ensure that it will always load that!

    Graciliano M. P.
    "Creativity is the expression of liberty".