GNU Parallel as job queue processor
问题 I have a worker.php file as below <?php $data = $argv[1]; //then some time consuming $data processing and I run this as a poor man's job queue using gnu parallel while read LINE; do echo $LINE; done < very_big_file_10GB.txt | parallel -u php worker.php which kind of works by forking 4 php processes when I am on 4 cpu machine. But it still feels pretty synchronous to me because read LINE is still reading one line at a time. Since it is 10GB file, I am wondering if somehow I can use parallel to