X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4713af90ef9c023d84da321abc1f387d195b8d48..4ccbacb51eb49323847a906c3e79ea838d76e2a7:/src/s4u/s4u_Exec.cpp diff --git a/src/s4u/s4u_Exec.cpp b/src/s4u/s4u_Exec.cpp index dc9c7a91aa..fda9b5bcde 100644 --- a/src/s4u/s4u_Exec.cpp +++ b/src/s4u/s4u_Exec.cpp @@ -20,6 +20,13 @@ Activity* Exec::start() return this; } +Activity* Exec::cancel() +{ + simgrid::simix::simcall([this] { dynamic_cast(pimpl_.get())->cancel(); }); + state_ = State::CANCELED; + return this; +} + Activity* Exec::wait() { simcall_execution_wait(pimpl_);