Replies: 2 comments 3 replies
-
We have a set number of tasks that can run in parallel at the moment. At Thought Machine it's set to 250. Each task is given a weight of 1 but I could see us saying this task uses 2 cores so it takes up 2 task queues. It would be kinda tricky to implement ontop of the current tasks queue, but re-architecting that to use weighted semaphores has been on the cards for a while now. What's the motivation here though? |
Beta Was this translation helpful? Give feedback.
-
I have a similar use case here. I use Please to build FreeBSD source, and then construct images from the built source. I may build multiple branches as part of a single build, and my machine can't handle all of those at once. I just live with I get that Please is designed to focus on super granular compilation units. But most popular languages come with their own build tools, and wrapping the existing build tool I think is an important intermediate step in Please adoption. Also there's the reality that some code bases will never go "full Please" - e.g. I doubt I'd even attempt to implement FreeBSD's code base at the granular level that Please likes. I think that an option like |
Beta Was this translation helpful? Give feedback.
-
Is there a mechanism (somewhere or planned) to support limiting how many tasks run in parallel?
Ninja supports creating "pools" of varying sizes which tasks can be placed in to. This allows for example one C++ file to compile per core of the computer except for an amalgamation file (like sqlite) or a huge link job (like clang, firefox, ..) where only one job is allowed to run across the whole system--but only for specific troublesome jobs--not setting the whole build to one core or so.
This is probably not super relevant if you are using remote workers but its a neat (if not frequently mentioned) feature Ninja has to control the job graph.
Beta Was this translation helpful? Give feedback.
All reactions