in reply to Threads memory consumption is infinite

i finished my solution to the problem...

sub main_loop { my $parser_thread; while( still_running() #and $hit_count < $hit_limit #could be commented out and time() < $expiration and ! $QUIT_NOW ) { #if we have less than 23 (including mysql) then make a new one if (scalar threads->list(threads::running) < 23 and schedule_count +()){ $parser_thread = async {process_url( next_scheduled_url() );}; } #cleanup dead threads if (threads->list(threads::joinable)){ foreach $parser_thread (threads->list(threads::joinable)){ $parser_thread->join; undef $parser_thread; } } } return; } sub still_running{ if (schedule_count()){return 1;} else { if (scalar threads->list(threads::running)){return 1;} else {return 0;} } }

The leak is either non-existent or drastically reduced. Thanks for the help everyone