
The thread::pool module allows you to set up a group of (worker) threads to execute a (large) number of similar jobs that need to be executed asynchronously. the routine that actually performs the job (the "do" routine), must be specified as a name or a reference to a (anonymous) subroutine.