http://qs321.pair.com?node_id=509626


in reply to Re: Thread exit errors
in thread Thread exit errors

Thanks Dave. I'm still very noobish to Perl, so I have a question on your response. the $_->join for threads->list, what does this do. The problem we are having, is that are services have a delay in their response time, being that our farthest host is between 200-400 miles from our distribution. Is this command going to keep the threads alive until a response if found? The reason for the multi threads is that the main thread, launches a method that is launching other threads to search for all of the servies on each host. So,
foreach $host(@syshosts) { @sysThread = threads->new( \&findHostNodes, $host ); } sub findHostNodes { my $host = @_; #print some stuff about the node #now find the services on the host foreach $service (@r21services) { @serviceThread = threads->new(\@shutdonwServices, $service); } } sub shutdownServices { shut down the windows services we are looking for }
From you response, in your opinion, what is the better method? Thanks, Jeff