+
+int Exec::get_thread_count() const
+{
+ return static_cast<kernel::activity::ExecImpl*>(pimpl_.get())->get_thread_count();
+}
+
+/** @brief Change the host on which this activity takes place.
+ *
+ * The activity cannot be terminated already (but it may be started). */
+ExecPtr Exec::set_host(Host* host)
+{
+ xbt_assert(state_ == State::INITED || state_ == State::STARTING || state_ == State::STARTED,
+ "Cannot change the host of an exec once it's done (state: %s)", to_c_str(state_));
+
+ if (state_ == State::STARTED)
+ boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_)->migrate(host);
+
+ kernel::actor::simcall_object_access(
+ pimpl_.get(), [this, host] { boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_)->set_host(host); });
+
+ if (state_ == State::STARTING)
+ // Setting the host may allow to start the activity, let's try
+ start();
+
+ return this;
+}
+
+ExecPtr Exec::set_hosts(const std::vector<Host*>& hosts)