in reply to cleanly exiting threads
use threads::shared; my $die : shared; #declare as shared before setting value $die = 0; while (<$out>) { return if $die; chomp; $err = 1 if (/^thread failed/); $Q->enqueue("$tid:$uut:$test:$_"); last if ($err); } while (1) { ....... ........ # put $die at an appropriate spot $die =1; ...... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: cleanly exiting threads
by JoeKamel (Acolyte) on Aug 15, 2008 at 04:33 UTC | |
by zentara (Cardinal) on Aug 15, 2008 at 13:17 UTC | |
by JoeKamel (Acolyte) on Aug 17, 2008 at 07:01 UTC | |
by zentara (Cardinal) on Aug 17, 2008 at 12:05 UTC |