From ddb1211b268612dc55dea470f9d88bc4eba7c4ee Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Mon, 3 Jul 2017 17:58:45 +0200 Subject: [PATCH 1/1] please henri, add recv with timeout. --- include/simgrid/s4u/Actor.hpp | 1 + src/s4u/s4u_actor.cpp | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index 5b0378c21d..524f508b66 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -313,6 +313,7 @@ template inline void sleep_for(std::chrono::durationsetDstData(&res, sizeof(res)); + c->wait(timeout); + return res; +} + void send(MailboxPtr chan, void* payload, double simulatedSize) { CommPtr c = Comm::send_init(chan); -- 2.20.1