foreach ( 1 .. $config->{number_of_threads} ) { $q->enqueue(undef); } #### while ( my $org = $q->dequeue() ) { parse_org( $org, $mech ); $pq->enqueue($org); } say "Finishing worker [$thread_id]"; return;