Commit Graph

1 Commits

Author SHA1 Message Date
Tobias Henkel ae887dab58
Improve resource usage with semaphores
Currently when jobs use semaphores they first get and lock the build
nodes and then aquire the semaphore. If there are many jobs waiting
for the semaphore this can block a substantial part of the available
resources. In order to make this safe default to acquire the semaphore
before requesting the nodes.

However in some cases when jobs with a semaphore shall run as fast as
possible in a consecutive manner then it might be preferrable to
accept some waste of resources. In order to support this use case the
job using a semaphore can override this behavior and still acquire the
semaphore after getting the nodes.

Change-Id: Id6f582ec29219d280d05319d1b822c7934437b7a
2018-11-20 15:20:59 +01:00