i think i've deduced that its in those 20 static threads... but im having trouble testing it
i need to be able to do something along the following:
sub main_loop { my $parser_thread; while( schedule_count() and $hit_count < $hit_limit #could be commented out and time() < $expiration and ! $QUIT_NOW and scalar threads->list(threads::running) <= 25 ) { #yield(); $parser_thread = async { process_url( next_scheduled_url() );}; } $parser_thread->join; return; }
the problem is that it creates the 20 threads and then joins them and thats the end... i want it to create 20 threads or so and as one dies off it spawns a new one... any thoughts? i feel like this is really close
In reply to Re: Threads memory consumption is infinite
by Godsrock37
in thread Threads memory consumption is infinite
by Godsrock37
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |