4 ms·
Maybe the example doesn't do justice but it looks more complicated than simply using "&" and "wait".
by Dibby053 3y ago
Maybe the example doesn't do justice but it looks more complicated than simply using "&" and "wait".
- liampaul 3y ago[flagged]
- pmontra 3y agoYup, it seems the perfect example to wonder if a language with async by default is appropriate for the use cases of bash scripts. The example runs 7 commands and has to explicitly await for 4 of them. The other 3 can run in parallel and it awaits for the end of all of them, which is fair. The typical bash script is sequential and I fear that its zx replacement will be an exercise of writing await, await, await. I'd go with an await by default language and wrap parallel code in whatever that language offers to wait for the end of child processes.