X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7f00b09c7ebfa3b4e12c96c764ee7a0e0e07ec20..cfb3987654b857620ba388fab9883a095debeb72:/include/simgrid/s4u/Exec.hpp diff --git a/include/simgrid/s4u/Exec.hpp b/include/simgrid/s4u/Exec.hpp index cd514ea08e..a0f02edcd0 100644 --- a/include/simgrid/s4u/Exec.hpp +++ b/include/simgrid/s4u/Exec.hpp @@ -11,8 +11,7 @@ #include #include -namespace simgrid { -namespace s4u { +namespace simgrid::s4u { /** Computation Activity, representing the asynchronous executions. * @@ -43,24 +42,14 @@ protected: void reset() const; - static xbt::signal on_start; - public: #ifndef DOXYGEN Exec(Exec const&) = delete; Exec& operator=(Exec const&) = delete; #endif - /*! Signal fired each time that an execution actually starts (no veto) */ - static void on_start_cb(const std::function& cb) { on_start.connect(cb); } - + /*! \static Initiate the creation of an Exec. Setters have to be called afterwards */ static ExecPtr init(); - /*! take a vector of s4u::ExecPtr and return when one of them is finished. - * The return value is the rank of the first finished ExecPtr. */ - static ssize_t wait_any(const std::vector& execs) { return wait_any_for(execs, -1); } - /*! Same as wait_any, but with a timeout. If the timeout occurs, parameter last is returned.*/ - static ssize_t wait_any_for(const std::vector& execs, double timeout); - /** @brief On sequential executions, returns the amount of flops that remain to be done; This cannot be used on * parallel executions. */ double get_remaining() const override; @@ -86,9 +75,26 @@ public: double get_cost() const; bool is_parallel() const { return parallel_; } bool is_assigned() const override; + +#ifndef DOXYGEN + static ssize_t deprecated_wait_any_for(const std::vector& execs, + double timeout); // XBT_ATTRIB_DEPRECATED_v339 + /*! \static take a vector of s4u::ExecPtr and return when one of them is finished. + * The return value is the rank of the first finished ExecPtr. */ + XBT_ATTRIB_DEPRECATED_v339("Please use ActivitySet instead") static ssize_t + wait_any(const std::vector& execs) + { + return deprecated_wait_any_for(execs, -1); + } + /*! \static Same as wait_any, but with a timeout. If the timeout occurs, parameter last is returned.*/ + XBT_ATTRIB_DEPRECATED_v339("Please use ActivitySet instead") static ssize_t + wait_any_for(const std::vector& execs, double timeout) + { + return deprecated_wait_any_for(execs, timeout); + } +#endif }; -} // namespace s4u -} // namespace simgrid +} // namespace simgrid::s4u #endif /* SIMGRID_S4U_EXEC_HPP */