Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use extension for user data in MSG
[simgrid.git] / src / s4u / s4u_Actor.cpp
index 1d719e0..f31600a 100644 (file)
@@ -39,6 +39,16 @@ ActorPtr Actor::self()
 
   return self_context->get_actor()->iface();
 }
+ActorPtr Actor::init(std::string name, s4u::Host* host)
+{
+  return SIMIX_process_self()->init(std::move(name), host)->iface();
+}
+
+ActorPtr Actor::start(std::function<void()> code)
+{
+  simgrid::simix::simcall([this, code] { return this->get_impl()->start(code); });
+  return this;
+}
 
 ActorPtr Actor::create(std::string name, s4u::Host* host, std::function<void()> code)
 {