/** Turn the current thread into maestro (the old maestro becomes a regular actor) */
virtual Context* create_maestro(std::function<void()>&& code, actor::ActorImpl* actor);
- virtual void run_all() = 0;
+ virtual void run_all(std::vector<actor::ActorImpl*> const& actors_list) = 0;
protected:
template <class T, class... Args> T* new_context(Args&&... args)
std::function<void()> code_;
actor::ActorImpl* actor_ = nullptr;
- bool iwannadie_ = false;
bool is_maestro_;
void declare_context(std::size_t size);
Context& operator=(const Context&) = delete;
virtual ~Context();
- bool wannadie() const { return iwannadie_; }
- void set_wannadie(bool value = true) { iwannadie_ = value; }
bool is_maestro() const { return is_maestro_; }
void operator()() const { code_(); }
bool has_code() const { return static_cast<bool>(code_); }