return actor->iface();
}
+/** Set a non-default stack size for this context (in Kb)
+ *
+ * This must be done before starting the actor, and it won't work with the thread factory. */
+ActorPtr Actor::set_stacksize(unsigned stacksize)
+{
+ pimpl_->set_stacksize(stacksize * 1024);
+ return this;
+}
+
ActorPtr Actor::start(const std::function<void()>& code)
{
simgrid::kernel::actor::simcall([this, &code] { pimpl_->start(code); });
return simgrid::s4u::Actor::init(name, host)->start(std::move(function)).get();
}
+void sg_actor_set_stacksize(sg_actor_t actor, unsigned size)
+{
+ actor->set_stacksize(size);
+}
+
void sg_actor_exit()
{
simgrid::s4u::this_actor::exit();