blob: 476a7a5e9250dcd20b5d3939f89609a9cbfdd53b (
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
|
#pragma once
#include <functional>
#include <library/cpp/actors/core/events.h>
namespace NActors {
class TSharedDescriptor: public TThrRefBase {
public:
virtual int GetDescriptor() = 0;
};
using TDelegate = std::function<void()>;
using TFDDelegate = std::function<TDelegate(const TIntrusivePtr<TSharedDescriptor>&)>;
class IPoller: public TThrRefBase {
public:
virtual ~IPoller() = default;
virtual void StartRead(const TIntrusivePtr<TSharedDescriptor>& s, TFDDelegate&& operation) = 0;
virtual void StartWrite(const TIntrusivePtr<TSharedDescriptor>& s, TFDDelegate&& operation) = 0;
};
}
|