I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2011-03-09 04:31:24.037525-08 by amolk
threads not finishing and script is hanging
I have following code contstuct for my thread implemention, However only 1 thread finishes and the script got hanged, no errors,no warnings.
while ( my @batchArr=$sth->fetchrow_array()){ my %batchAcctsHash = &getAccounts(parameters.....); threads->create(sub {doAudit(param1,\%hahparam2,$param3)}); } foreach $thread (threads->list()){ $thread->join(); } sub doAudit{ $param1=$_[0]; %param2=%{$_[1]}; $param3 =$_[2]; code...which call subroutines from user defined module. }
this code generate 3 threads but only 1 of them finishes and script got hanged. Please suggests. amolk
Direct Responses: 13248 | Write a response
Posted on 2011-03-09 06:16:44.152308-08 by jdhedden in response to 13247
Re: threads not finishing and script is hanging
There is no way to know what is the problem based on the information you've given. Your code may be using non-thread-safe modules, or it may be encounter a previously know threads issues (such as close() of filehandles in multiple threads). You would need to provide a self-contained script that reproduces the problem. Also, you should report what version of Perl and 'threads' you are using.
Direct Responses: 13250 | Write a response
Posted on 2011-03-11 17:38:48.824993-08 by naidaabekas in response to 13248
Re: threads not finishing and script is hanging
having the same issue in another program Immobilien Mallorca Real Estate Mallorca Inmobiliario Mallorca
Direct Responses: Write a response