aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/oldmodule/startsession.h
blob: 864f82b316b341adf379601951ea94f1cd9a98f1 (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
27
28
29
30
31
32
33
34
#pragma once

#include <library/cpp/messagebus/ybus.h>

#include <util/system/thread.h>

namespace NBus {
    class TBusModule;

    class TBusStarter {
    private:
        TBusModule* Module;
        TBusSessionConfig Config;
        TThread StartThread;
        bool Exiting;
        TCondVar ExitSignal;
        TMutex ExitLock;
 
        static void* _starter(void* data);

        void Starter();

        TString GetStatus(ui16 /*flags=YBUS_STATUS_CONNS*/) {
            return "";
        }

    public:
        TBusStarter(TBusModule* module, const TBusSessionConfig& config);
        ~TBusStarter();

        void Shutdown();
    };

}