X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/558acbe23fca1cd940f2cdd70530e71963be372c..c630e592bf768a21557ad91fd626ea5943449152:/src/s4u/s4u_Actor.cpp diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index 1d719e04b3..f31600a392 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -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 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 code) {