From 0208b7058b1c092dc1b5f9a7509359d36a48ba8c Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 3 Nov 2021 18:05:53 +0300 Subject: [PATCH] Don't catch ActorContext by MutiPromiseActor and SleepActor. --- tdactor/td/actor/MultiPromise.h | 7 +++++++ tdactor/td/actor/SleepActor.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/tdactor/td/actor/MultiPromise.h b/tdactor/td/actor/MultiPromise.h index 630a689ad..017bc5988 100644 --- a/tdactor/td/actor/MultiPromise.h +++ b/tdactor/td/actor/MultiPromise.h @@ -91,6 +91,13 @@ class MultiPromiseActor final } }; +template <> +class ActorTraits { + public: + static constexpr bool need_context = false; + static constexpr bool need_start_up = true; +}; + class MultiPromiseActorSafe final : public MultiPromiseInterface { public: void add_promise(Promise &&promise) final; diff --git a/tdactor/td/actor/SleepActor.h b/tdactor/td/actor/SleepActor.h index 659db5f1a..3e257dd8d 100644 --- a/tdactor/td/actor/SleepActor.h +++ b/tdactor/td/actor/SleepActor.h @@ -31,4 +31,11 @@ class SleepActor final : public Actor { } }; +template <> +class ActorTraits { + public: + static constexpr bool need_context = false; + static constexpr bool need_start_up = true; +}; + } // namespace td