aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/coroutine/engine/poller.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/coroutine/engine/poller.h
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/coroutine/engine/poller.h')
-rw-r--r--library/cpp/coroutine/engine/poller.h66
1 files changed, 33 insertions, 33 deletions
diff --git a/library/cpp/coroutine/engine/poller.h b/library/cpp/coroutine/engine/poller.h
index 054de6616b..8ea012c0fc 100644
--- a/library/cpp/coroutine/engine/poller.h
+++ b/library/cpp/coroutine/engine/poller.h
@@ -1,11 +1,11 @@
#pragma once
-
-#include <util/generic/ptr.h>
-#include <util/generic/vector.h>
-#include <util/network/socket.h>
-#include <util/network/pollerimpl.h>
-#include <util/datetime/base.h>
-
+
+#include <util/generic/ptr.h>
+#include <util/generic/vector.h>
+#include <util/network/socket.h>
+#include <util/network/pollerimpl.h>
+#include <util/datetime/base.h>
+
enum class EContPoller {
Default /* "default" */,
Combined /* "combined" */,
@@ -15,36 +15,36 @@ enum class EContPoller {
Kqueue /* "kqueue" */
};
-class IPollerFace {
-public:
- struct TChange {
+class IPollerFace {
+public:
+ struct TChange {
SOCKET Fd;
- void* Data;
- ui16 Flags;
- };
-
- struct TEvent {
- void* Data;
- int Status;
- ui16 Filter;
- };
-
+ void* Data;
+ ui16 Flags;
+ };
+
+ struct TEvent {
+ void* Data;
+ int Status;
+ ui16 Filter;
+ };
+
using TEvents = TVector<TEvent>;
-
- virtual ~IPollerFace() {
- }
-
+
+ virtual ~IPollerFace() {
+ }
+
void Set(void* ptr, SOCKET fd, ui16 flags) {
- const TChange c = {fd, ptr, flags};
-
- Set(c);
- }
-
- virtual void Set(const TChange& change) = 0;
- virtual void Wait(TEvents& events, TInstant deadLine) = 0;
+ const TChange c = {fd, ptr, flags};
+
+ Set(c);
+ }
+
+ virtual void Set(const TChange& change) = 0;
+ virtual void Wait(TEvents& events, TInstant deadLine) = 0;
virtual EContPoller PollEngine() const = 0;
-
+
static THolder<IPollerFace> Default();
static THolder<IPollerFace> Construct(TStringBuf name);
static THolder<IPollerFace> Construct(EContPoller poller);
-};
+};