pimpl_ = kernel::activity::ExecImplPtr(new kernel::activity::ExecImpl());
}
-bool Exec::test()
-{
- xbt_assert(state_ == State::INITED || state_ == State::STARTED || state_ == State::STARTING ||
- state_ == State::FINISHED);
-
- if (state_ == State::FINISHED)
- return true;
-
- if (state_ == State::INITED || state_ == State::STARTING)
- this->vetoable_start();
-
- if (kernel::actor::simcall([this] { return this->get_impl()->test(); })) {
- state_ = State::FINISHED;
- this->release_dependencies();
- return true;
- }
-
- return false;
-}
-
Exec* Exec::wait()
{
return this->wait_for(-1);
{
if (state_ == State::INITED)
vetoable_start();
- simcall_execution_wait(get_impl(), timeout);
+
+ 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(*Actor::self(), *this);
this->release_dependencies();