in reply to How to forcefully destroy a thread
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.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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to forcefully destroy a thread
by Joost (Canon) on Aug 11, 2004 at 09:02 UTC | |
by danielcid (Scribe) on Aug 11, 2004 at 12:26 UTC | |
by Joost (Canon) on Aug 11, 2004 at 12:29 UTC |