in reply to How to forcefully destroy a thread

I am looking for the same answer you are. I am running the code on Win32 (Perl 5.8.4). This is my code:
my @threads; foreach my $suite (@suite) { push @threads, Thread->new(\&runThread, $suite); } foreach my $t (@threads) { push @outputLog, @{$t->join}; } sub runThread { my $self = Thread->self; logInfo("Thread #", $self->tid, " (@_) started..."); my @output = qx{start JVM instance here}; checkExitValue(); return \@output; }
I had no luck prematurely terminating a thread, and if i kill the program, the threads (JVM instances) are still running utilizing my CPU by 100%. In Programming Perl edition 3 in a Thread Model chapter, they say a way to terminate a thread would be by calling a return in a top-level function, but it didnt quite work for me. I am still struggling. Anyone? Thanks.

Replies are listed 'Best First'.
Re^2: How to forcefully destroy a thread
by Joost (Canon) on Aug 11, 2004 at 09:02 UTC
      All the threads inside a single process has the same PID. So it will not work.

      -DBC