Improvements for @perfile

You might take a look at the thread referenced below. It shows a way to launch commands in a controlled number of threads.