On Sun, 24 Nov 2002 08:35:01 -0500, "Dave Crawford" <[EMAIL PROTECTED]> wrote:
>These are the log results with the code as is below: > > ShutdownIO() > A thread exited while 2 other threads were still running. > >You'll notice that the DLL object is destroyed before the child thread has a >chance to exit the while() loop. The 'print "Exiting...\n";' never gets >evaluated and it displays an message about other threads exisiting. That is expected I would think. Just don't detach() your child thread, and then join() it in ShutdownIO() before returning. >If I uncomment the sleep() call in ShutdownIO() then the debug shows that >the child thread exits it's while() loop... > > ShutdownIO()... > Exiting... > Free to wrong pool 1283b00 not 849b58 during global destruction. > >But then the "Free to wrong pool..." messages appear. That looks like a bug in the tread::shared implementation to me. You may want to report it to the perl5-porters or the perl-ithreads mailing lists. Of course it would be easier to debug if there was a reproducible test case with just Perl itself, not involving PerlCtrl and another VB app. :( Do you still get the the "wrong pool" error if you don't use detached threads? >Is there a way to delay 'global destruction' until the child thread has >completed? Yes, join() the child thread. Cheers, -Jan _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs