Queue shell commands to be executed in a pool of threads