# prepare thread pool my $pool = Thread::Pool::Simple->new( min => 2, # at least 2 workers max => 10, # at most 10 workers load => 3, do => [\&parse_artifact] ) || print "couldn't create thread pool: $!\n";;