G
Gavin Williams
Experiencing a problem when using the Win32::OLE and the threads module in
the same script.
As soon as the a thread terminates I get an error "Free to wrong pool
15dd170 not 15d2750 during global destruction."
Would appreciate some input on how to resolve this.
Here is a very simple script you can use to demonstrate the problem with:
#--------------------------------------------------------------------
use Win32::OLE ;
use threads ;
sub dostuff {
print "Stuff\n" ;
return 1 ;
}
sub startthr {
my $thr = threads->new( \&dostuff ) ;
our $tid = $thr->tid ;
}
sub stopthr {
our $tid ;
my $thr = threads->object( $tid ) ;
my $result = $thr->join ;
undef $thr ;
undef $tid ;
}
print "Starting thread\n" ;
startthr() ;
sleep(10) ;
print "Stopping thread\n" ;
stopthr() ;
print "A memory pool error should have occurred, and this line will
probably not print.\n"
#--------------------------------------------------------------------
the same script.
As soon as the a thread terminates I get an error "Free to wrong pool
15dd170 not 15d2750 during global destruction."
Would appreciate some input on how to resolve this.
Here is a very simple script you can use to demonstrate the problem with:
#--------------------------------------------------------------------
use Win32::OLE ;
use threads ;
sub dostuff {
print "Stuff\n" ;
return 1 ;
}
sub startthr {
my $thr = threads->new( \&dostuff ) ;
our $tid = $thr->tid ;
}
sub stopthr {
our $tid ;
my $thr = threads->object( $tid ) ;
my $result = $thr->join ;
undef $thr ;
undef $tid ;
}
print "Starting thread\n" ;
startthr() ;
sleep(10) ;
print "Stopping thread\n" ;
stopthr() ;
print "A memory pool error should have occurred, and this line will
probably not print.\n"
#--------------------------------------------------------------------