+ bool iwannadie = false;
+
+ Context(std::function<void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t actor);
+ Context(const Context&) = delete;
+ Context& operator=(const Context&) = delete;
+ virtual ~Context();
+
+ void operator()() { code_(); }
+ bool has_code() const { return static_cast<bool>(code_); }
+ smx_actor_t get_actor() { return this->actor_; }
+ void set_cleanup(void_pfn_smxprocess_t cleanup) { cleanup_func_ = cleanup; }
+
+ // Scheduling methods
+ virtual void stop();
+ virtual void suspend() = 0;
+
+ // Retrieving the self() context
+ /** @brief Retrives the current context of this thread */
+ static Context* self();
+ /** @brief Sets the current context of this thread */
+ static void set_current(Context* self);
+