Hacker News new | past | comments | ask | show | jobs | submit login

So this?

  ( wget http://mymirror/big1.iso; wget http://mymirror/big2.iso ) &



Yes, this is closer to what nq is doing :) This comparison is addressed over here: https://news.ycombinator.com/item?id=25920995


I see, what about this then?:)

Run the queue:

  mkfifo q
  ( while True; do sh q; done ) &

Schedule jobs:

  echo wget http://mymirror/big1.iso > q
  echo wget http://mymirror/big1.iso > q

This has the added benefit of supporting multiple queues.


Watch out, FIFOs don't have buffers, so that echo will block. Running the echos in the background causes a race condition on execution order.


Named pipes actually do have buffers, you might be thinking about unnamed pipes created by bash.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: