Hi,

I used ithreads to write a diagnostic/monitoring tool that should (ideally)
run permanently in our environment.  I use ActivePerl 5.8 on W2K boxes.  It
works very well but it crashes after a few hours of operation.
The problem seems that I'm using shared arrays.  When I look at the Windows
Task Manager I see that the Memory Usage and the number of Handles grows
continuously causing my crash.

I found this list while trying to figure out what to do.  I saw mentions of
memory leaks in a few places and a statement by Arthur Bergman that they
should be resolved by release 5.8.1.

My questions are :

Is there a place where we have a clear description of the known ithreads
memory problems?

Is there a tentative date for the release of this 5.8.1 version ? ( Is it a
matter of weeks/months/years? )

Is the handle count I observe part of the same problem? a new one? an error
on my part?

Couldn't these known problems be mentioned as bugs in the
threads/threads::shared modules documentation?


This is the skeleton of my test program :

use strict;
use warnings;
use threads;
use threads::shared;
  
my @a : shared = ();
my $a_thread = threads->create(\&athread, [EMAIL PROTECTED] );
my $b_thread = threads->create(\&bthread, [EMAIL PROTECTED] );

$a_thread->join;

sub athread {
  my ($list) = @_;
  while(1) {
    {
      lock $list;
      print "A = @$list\n";
    }
    sleep 1;
  }
}

sub bthread {
  my ( $list) = @_;
  while(1) {
    {
      lock $list;
      @$list = (1,2);
    }
    sleep 1;
  }
}


Thanks

Curufin



Reply via email to