Reputation: 3638
I am build a system that is similar to project builds. A project has set of inputs and outputs. A project may depend on other projects. I can use topological sort and find the sequence in which I must evaluate projects. But, how do I parallel build. Toposort does not give same ranks to projects that can build in parallel. Also, how do I do incremental builds.
Upvotes: 3
Views: 387
Reputation: 5764
You can parallel build all projects which have not any dependencies. After build remove builded project from graph and again build projects without dependencies. Repeat until graph is empty.
In pseudo code
Upvotes: 1