Replies: 1 comment 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.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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