Anybody use Devel::LeakTrace on their ithreaded applications?  I get leaks
out the wazoo for the simplest things.  Sometimes it just get segmentation
faults.

Try with: perl -MDevel::LeakTrace test.pl.  

put in file test.pl:

use strict;
use threads;
use threads::shared;

for (my $count = 0; $count < 2; $count++) {
   eval {
      my $thr = new threads(\&oof,$count);
   };
}

my @threads = threads->list();

foreach my $thr (@threads) {
   my $result = 0;
   $result = eval {
      $thr->join();
   };
  
   if ($@) { 
      warn "Exception in thread: [EMAIL PROTECTED]"; 
   } else { print "returned: $return\n"; }   <--- error about can't join
detached thread

}

sub oof : locked method {
   my $count = shift;
   print "count: " . $count . "\n";
   return 1;
}


Reply via email to