-/* Copyright (c) 2006-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
namespace simgrid {
namespace s4u {
-xbt::signal<void(Exec const&, Actor const&)> Exec::on_start;
-xbt::signal<void(Exec const&, Actor const&)> Exec::on_completion;
+xbt::signal<void(Exec const&)> Exec::on_start;
+xbt::signal<void(Exec const&)> Exec::on_completion;
Exec::Exec()
{
pimpl_ = kernel::activity::ExecImplPtr(new kernel::activity::ExecImpl());
}
+ExecPtr Exec::init()
+{
+ return ExecPtr(new Exec());
+}
+
Exec* Exec::wait()
{
return this->wait_for(-1);
kernel::actor::ActorImpl* issuer = Actor::self()->get_impl();
kernel::actor::simcall_blocking<void>([this, issuer, timeout] { this->get_impl()->wait_for(issuer, timeout); });
state_ = State::FINISHED;
- on_completion(*this, *Actor::self());
+ on_completion(*this);
this->release_dependencies();
return this;
}
pimpl_->suspend();
state_ = State::STARTED;
- on_start(*this, *Actor::self());
+ on_start(*this);
return this;
}