X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/af72ee01a6a0c01b1a67dc3095f952fd8ab1dd42..e71a2a302d28430dc1bfee906f842f5f3d0fa3ce:/src/s4u/s4u_Comm.cpp diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index 066f4f4263..23eaf0d2dc 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -138,6 +138,11 @@ CommPtr Comm::sendto_async(Host* from, Host* to, double simulated_size_in_bytes) return res; } +void Comm::sendto(Host* from, Host* to, double simulated_size_in_bytes) +{ + sendto_async(from, to, simulated_size_in_bytes)->wait(); +} + Comm* Comm::start() { xbt_assert(get_state() == State::INITED || get_state() == State::STARTING, @@ -147,7 +152,7 @@ Comm* Comm::start() xbt_assert(src_buff_ == nullptr && dst_buff_ == nullptr, "Direct host-to-host communications cannot carry any data."); pimpl_ = kernel::actor::simcall([this] { - auto res = new kernel::activity::CommImpl(this->from_, this->to_, this->get_remaining()); + kernel::activity::CommImplPtr res(new kernel::activity::CommImpl(this->from_, this->to_, this->get_remaining())); res->start(); return res; });