aboutsummaryrefslogtreecommitdiffstats
path: root/yt/yt/core/concurrency/thread_pool_poller.h
blob: 4bfa95f590d93f035d0429ea94157d8acb105247 (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
#pragma once

#include "poller.h"

namespace NYT::NConcurrency {

////////////////////////////////////////////////////////////////////////////////

struct IThreadPoolPoller
    : public IPoller
{
    //! Reconfigures number of polling threads.
    virtual void Reconfigure(int threadCount) = 0;
};

DEFINE_REFCOUNTED_TYPE(IThreadPoolPoller)

////////////////////////////////////////////////////////////////////////////////

IThreadPoolPollerPtr CreateThreadPoolPoller(
    int threadCount,
    const TString& threadNamePrefix,
    const TDuration pollingPeriod = TDuration::MilliSeconds(10));

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT::NConcurrency