X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/518f95f235ccf91a7ebb529b43f5675625e9ec2f..17496ac16483b8d60b8c375ac109d4c19639297b:/src/simix/ActorImpl.hpp diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index 5c1bfcaaef..4af9978308 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -25,7 +25,7 @@ namespace actor { class ActorImpl : public simgrid::surf::PropertyHolder { public: - ActorImpl() : piface_(this) {} + ActorImpl(simgrid::xbt::string name, simgrid::s4u::Host* host); ~ActorImpl(); void set_auto_restart(bool autorestart) { auto_restart_ = autorestart; } @@ -101,6 +101,8 @@ public: smx_activity_t sleep(double duration); void set_user_data(void* data) { userdata_ = data; } void* get_user_data() { return userdata_; } + /** Ask the actor to throw an exception right away */ + void throw_exception(std::exception_ptr e); }; class ProcessArg { @@ -112,6 +114,7 @@ public: double kill_time = 0.0; std::shared_ptr> properties = nullptr; bool auto_restart = false; + bool daemon_ = false; ProcessArg() = default; explicit ProcessArg(std::string name, std::function code, void* data, s4u::Host* host, double kill_time, @@ -133,6 +136,7 @@ public: , host(host) , kill_time(SIMIX_timer_get_date(actor->kill_timer)) , auto_restart(actor->auto_restart_) + , daemon_(actor->is_daemon()) { properties.reset(actor->get_properties(), [](decltype(actor->get_properties())) {}); }