aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/core/harmonizer.h
blob: dae8d7de0c31c862aa6c9b068aeb8b8e4839265a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include "defs.h"
#include "config.h"

namespace NActors {
    class IExecutorPool;

    // 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) = 0;
        virtual void Enable(bool enable) = 0;
    };

    IHarmonizer* MakeHarmonizer(ui64 ts);
}