sub main_loop { while( schedule_count() and $hit_count < $hit_limit #could be commented out and time() < $expiration and ! $QUIT_NOW ) { #yield(); my $parser_thread1 = async { process_url( next_scheduled_url() );}; } return; }