5 points speckx 1 hour ago 3 comments
kernc 9 minutes ago | parent
> language with poor concurrency controls
Few other languages have as many builtins/keywords for concurrency control: &, wait, jobs ...
js2 8 minutes ago | parent
> How to run shell commands in parallel while limiting their concurrency.
Depending upon the task, generate a Makefile and run it with:
make -n <concurrency>
> My original use case had to do with making a large number of web requestsThis is in fact the use case that caused me to think about using a Makefile for concurrency probably 20 years ago. A rule for downloading each URL to a file. Then a simple `make -n <n>` with whatever concurrency I desired and bonus: automatically skipping already downloaded files.
tacostakohashi 5 minutes ago | parent
I guess that works.
I've always been fond of using make for things to get free parallelism / ability to interrupt / restart / incremental updates.