-
Notifications
You must be signed in to change notification settings - Fork 573
Add [parallel]
attribute for running dependencies in parallel
#2803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
FWIW I've tested this on two of my projects: smaller one and one that's a little bigger and it worked well. Of course the text was a bit interleaved (when subcommands used "progress-bars") but it was perfectly readable. When one of the sub-recipes failed I saw immediately at the end what was it. It's really cool that one can just slap a Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For tests, I think you should test for out of order outputs to validate that each task is executed concurrently rather than serially. There should be at least 2 or 3 runs of the same test to validate each output is at least somewhat different from the previous because that implicitly proves that they are run independently from each other. There may be cases depending on your system where each test coincidentally outputs the same order so I imagine the test case would need to account for that.
This is working great, thanks! I was over-zealous and made a I think it would make sense to be able to control how many dependencies are spawned at a time for a particular [parallel: 10]
my-job: dep01 dep02 .. dep70 The |
@W1M0R I think this is reasonable. The implementation will be a little rough. This is what the thread spawning code looks like now:
In order to implement this, I think threads will have to send |
Maybe the parallelism should depend on something on the user's machine, eg the number of cores? 10 may be a good number on your computer but others may have worse or better machines... 🤔 |
Fixes #626.