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

#include <util/generic/ptr.h>

namespace NActors {
    class TThreadParkPad {
    private:
        class TImpl;
        THolder<TImpl> Impl;

    public:
        TThreadParkPad();
        ~TThreadParkPad();

        bool Park() noexcept;
        void Unpark() noexcept;
        void Interrupt() noexcept;
        bool Interrupted() const noexcept;
    };

}