aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/rain_check/core/env.h
diff options
context:
space:
mode:
authornga <nga@yandex-team.ru>2022-02-10 16:48:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:09 +0300
commit1f553f46fb4f3c5eec631352cdd900a0709016af (patch)
treea231fba2c03b440becaea6c86a2702d0bfb0336e /library/cpp/messagebus/rain_check/core/env.h
parentc4de7efdedc25b49cbea74bd589eecb61b55b60a (diff)
downloadydb-1f553f46fb4f3c5eec631352cdd900a0709016af.tar.gz
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/rain_check/core/env.h')
-rw-r--r--library/cpp/messagebus/rain_check/core/env.h62
1 files changed, 31 insertions, 31 deletions
diff --git a/library/cpp/messagebus/rain_check/core/env.h b/library/cpp/messagebus/rain_check/core/env.h
index f6dd7fceb6..4e289dbd3d 100644
--- a/library/cpp/messagebus/rain_check/core/env.h
+++ b/library/cpp/messagebus/rain_check/core/env.h
@@ -1,47 +1,47 @@
-#pragma once
-
+#pragma once
+
#include "sleep.h"
#include "spawn.h"
-
+
#include <library/cpp/messagebus/actor/executor.h>
-
+
#include <util/generic/ptr.h>
-
-namespace NRainCheck {
- struct IEnv {
- virtual ::NActor::TExecutor* GetExecutor() = 0;
+
+namespace NRainCheck {
+ struct IEnv {
+ virtual ::NActor::TExecutor* GetExecutor() = 0;
virtual ~IEnv() {
}
- };
-
- template <typename TSelf>
- struct TEnvTemplate: public IEnv {
- template <typename TTask, typename TParam>
- TIntrusivePtr<typename TTask::TTaskRunner> SpawnTask(TParam param) {
+ };
+
+ template <typename TSelf>
+ struct TEnvTemplate: public IEnv {
+ template <typename TTask, typename TParam>
+ TIntrusivePtr<typename TTask::TTaskRunner> SpawnTask(TParam param) {
return ::NRainCheck::SpawnTask<TTask, TSelf>((TSelf*)this, param);
- }
- };
-
- template <typename TSelf>
- struct TSimpleEnvTemplate: public TEnvTemplate<TSelf> {
- ::NActor::TExecutorPtr Executor;
- TSleepService SleepService;
-
- TSimpleEnvTemplate(unsigned threadCount = 0)
- : Executor(new ::NActor::TExecutor(threadCount != 0 ? threadCount : 4))
+ }
+ };
+
+ template <typename TSelf>
+ struct TSimpleEnvTemplate: public TEnvTemplate<TSelf> {
+ ::NActor::TExecutorPtr Executor;
+ TSleepService SleepService;
+
+ TSimpleEnvTemplate(unsigned threadCount = 0)
+ : Executor(new ::NActor::TExecutor(threadCount != 0 ? threadCount : 4))
{
}
-
+
::NActor::TExecutor* GetExecutor() override {
return Executor.Get();
}
- };
-
- struct TSimpleEnv: public TSimpleEnvTemplate<TSimpleEnv> {
+ };
+
+ struct TSimpleEnv: public TSimpleEnvTemplate<TSimpleEnv> {
TSimpleEnv(unsigned threadCount = 0)
: TSimpleEnvTemplate<TSimpleEnv>(threadCount)
{
}
- };
-
-}
+ };
+
+}