"hydra-queue-runner --status" now prints how many runnable and running build steps exist for each machine type. This allows additional machines to be provisioned based on the Hydra load.
13 lines
224 B
C++
13 lines
224 B
C++
#pragma once
|
|
|
|
#include <atomic>
|
|
|
|
typedef std::atomic<unsigned long> counter;
|
|
|
|
struct MaintainCount
|
|
{
|
|
counter & c;
|
|
MaintainCount(counter & c) : c(c) { c++; }
|
|
~MaintainCount() { auto prev = c--; assert(prev); }
|
|
};
|