blob: 5ab44369aae687cbb1ddd2556384ca74a550f9a4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#pragma once
#include "defs.h"
#include "config.h"
namespace NActors {
class IExecutorPool;
struct TPoolStateFlags {
bool IsNeedy = false;
bool IsStarved = false;
};
// Pool cpu harmonizer
class IHarmonizer {
public:
virtual ~IHarmonizer() {}
virtual void Harmonize(ui64 ts) = 0;
virtual void DeclareEmergency(ui64 ts) = 0;
virtual void AddPool(IExecutorPool* pool, TSelfPingInfo *pingInfo = nullptr) = 0;
virtual void Enable(bool enable) = 0;
virtual TPoolStateFlags GetPoolFlags(i16 poolId) const = 0;
};
IHarmonizer* MakeHarmonizer(ui64 ts);
}
|