class XBT_PUBLIC Context {
friend ContextFactory;
- static thread_local Context* current_;
-
std::function<void()> code_;
actor::ActorImpl* actor_ = nullptr;
void declare_context(std::size_t size);
// Retrieving the self() context
/** @brief Retrives the current context of this thread */
- static Context* self() { return current_; }
+ static Context* self();
/** @brief Sets the current context of this thread */
- static void set_current(Context* self) { current_ = self; }
+ static void set_current(Context* self);
};
class XBT_PUBLIC AttachContext : public Context {