S4U
- Execution->setHost() can be called after start() to migrate it.
- Comm::test_any() is now implemented.
+ - s4u::Actor now has an onCreation() signal.
XBT
- Remove XBT_LOG_CONNECT, it should be useless nowadays.
#include <xbt/Extendable.hpp>
#include <xbt/functional.hpp>
#include <xbt/string.hpp>
+#include <xbt/signal.hpp>
#include <simgrid/chrono.hpp>
#include <simgrid/s4u/forward.hpp>
/** Retrieve a reference to myself */
static ActorPtr self();
+ /** Signal to others that a new actor has been created **/
+ static simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> onCreation;
+
/** Create an actor using a function
*
* If the actor is restarted, the actor has a fresh copy of the function.
}
namespace simgrid {
+
+namespace s4u {
+simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> s4u::Actor::onCreation; // TODO cheinrich is this the right location here?
+}
namespace simix {
ActorImpl::~ActorImpl()
}
smx_actor_t process = new simgrid::simix::ActorImpl();
+ simgrid::s4u::ActorPtr tmp = process->iface(); // Passing this directly to onCreation will lead to crashes
+ simgrid::s4u::Actor::onCreation(tmp);
xbt_assert(code && host != nullptr, "Invalid parameters");
/* Process data */