Bug: watch doesn't run any more than concurrency limit
natew opened this issue · 3 comments
natew commented
For long-running processes, this is a bit of a unintuitive edge case.
If I run ultra -r watch
it will only run the first 10 (concurrency default) processes. I guess this makes sense, but it was confusing.
I think two changes would help:
- Documentation around long-running processes like watch never going above concurrency
- Commands that include
watch
could have a notice that says they will limit to the concurrency level.
natew commented
Some more clever solutions:
- Have a flag
--concurrent-wait
or similar, default is 5 seconds. If a process takes more than that time, ultra continues launching other processes. - Have a flag
--all
as a shorthand for setting concurrency to infinity. - Auto-detect
watch
and bump concurrency to infinity, console.log a warning - Really fancy: have a flag
--smart-concurrency
(default true) that detects when cpu load goes down and continues launching processes based on that (this would fix my use case probably best as we are running basically all typescript watch, and they basically all start instantly mostly)
folke commented
Good catch! :)
I'll add this to the documentation and see if I can add some improvements.
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.