From: Arnaud Giersch Date: Tue, 26 Sep 2017 09:38:02 +0000 (+0200) Subject: Allow to specify a cleanup handler for detached comms. X-Git-Tag: v3_17~77 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f997dd57c10e92aaed05832c96db7348d0da87ed Allow to specify a cleanup handler for detached comms. --- diff --git a/include/simgrid/s4u/Comm.hpp b/include/simgrid/s4u/Comm.hpp index dcb0e17745..ff9f2685ad 100644 --- a/include/simgrid/s4u/Comm.hpp +++ b/include/simgrid/s4u/Comm.hpp @@ -102,6 +102,12 @@ public: /** Start the comm, and ignore its result. It can be completely forgotten after that. */ void detach(); + /** Start the comm, and ignore its result. It can be completely forgotten after that. */ + void detach(void (*cleanFunction)(void*)) + { + cleanFunction_ = cleanFunction; + detach(); + } /** Sets the maximal communication rate (in byte/sec). Must be done before start */ void setRate(double rate);