Don't catch ActorContext by MutiPromiseActor and SleepActor.

This commit is contained in:
levlam 2021-11-03 18:05:53 +03:00
parent 4266841b64
commit 0208b7058b
2 changed files with 14 additions and 0 deletions

View File

@ -91,6 +91,13 @@ class MultiPromiseActor final
}
};
template <>
class ActorTraits<MultiPromiseActor> {
public:
static constexpr bool need_context = false;
static constexpr bool need_start_up = true;
};
class MultiPromiseActorSafe final : public MultiPromiseInterface {
public:
void add_promise(Promise<Unit> &&promise) final;

View File

@ -31,4 +31,11 @@ class SleepActor final : public Actor {
}
};
template <>
class ActorTraits<SleepActor> {
public:
static constexpr bool need_context = false;
static constexpr bool need_start_up = true;
};
} // namespace td