X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/27f991037b8d3e6181741b3ca41df44b64b66d4d..651f050b85468c6bb07046c9f1932e5cc2ce5ffe:/src/s4u/s4u_Comm.cpp diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index c231d1e59e..0b57262abd 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -184,9 +184,8 @@ Activity* Comm::detach() Activity* Comm::cancel() { - simgrid::kernel::activity::CommImplPtr commPimpl = - boost::static_pointer_cast(pimpl_); - commPimpl->cancel(); + simgrid::simix::simcall([this] { dynamic_cast(pimpl_.get())->cancel(); }); + state_ = State::CANCELED; return this; }