:cpp:func:`Comm::on_resume <simgrid::s4u::Comm::on_resume_cb>`
:cpp:func:`Comm::on_this_resume <simgrid::s4u::Comm::on_this_resume_cb>`
:cpp:func:`Comm::on_veto <simgrid::s4u::Comm::on_veto_cb>`
+ :cpp:func:`Comm::on_this_veto <simgrid::s4u::Comm::on_this_veto_cb>`
- :cpp:func:`Exec::on_start <simgrid::s4u::Exec::on_start_cb>`
:cpp:func:`Exec::on_this_start <simgrid::s4u::Exec::on_this_start_cb>`
:cpp:func:`Exec::on_completion <simgrid::s4u::Exec::on_completion_cb>`
:cpp:func:`Exec::on_resume <simgrid::s4u::Exec::on_resume_cb>`
:cpp:func:`Exec::on_this_resume <simgrid::s4u::Exec::on_this_resume_cb>`
:cpp:func:`Exec::on_veto <simgrid::s4u::Exec::on_veto_cb>`
+ :cpp:func:`Exec::on_this_veto <simgrid::s4u::Exec::on_this_veto_cb>`
- :cpp:func:`Io::on_start <simgrid::s4u::Io::on_start_cb>`
:cpp:func:`Io::on_this_start <simgrid::s4u::Io::on_this_start_cb>`
:cpp:func:`Io::on_completion <simgrid::s4u::Io::on_completion_cb>`
:cpp:func:`Io::on_resume <simgrid::s4u::Io::on_resume_cb>`
:cpp:func:`Io::on_this_resume <simgrid::s4u::Io::on_this_resume_cb>`
:cpp:func:`Io::on_veto <simgrid::s4u::Io::on_veto_cb>`
+ :cpp:func:`Io::on_this_veto <simgrid::s4u::Io::on_this_veto_cb>`
Existing Plugins
****************
virtual void fire_on_completion() const = 0;
virtual void fire_on_this_completion() const = 0;
- virtual void fire_on_veto() const = 0;
virtual void fire_on_suspend() const = 0;
virtual void fire_on_this_suspend() const = 0;
virtual void fire_on_resume() const = 0;
virtual void fire_on_this_resume() const = 0;
+ virtual void fire_on_veto() const = 0;
+ virtual void fire_on_this_veto() const = 0;
public:
XBT_ATTRIB_DEPRECATED_v334("All start() are vetoable now. Please use start() ") void vetoable_start()
if (vetoed_activities_ != nullptr)
vetoed_activities_->insert(this);
fire_on_veto();
+ fire_on_this_veto();
}
}
protected:
inline static xbt::signal<void(AnyActivity const&)> on_completion;
xbt::signal<void(AnyActivity const&)> on_this_completion;
- inline static xbt::signal<void(AnyActivity&)> on_veto;
inline static xbt::signal<void(AnyActivity const&)> on_suspend;
xbt::signal<void(AnyActivity const&)> on_this_suspend;
inline static xbt::signal<void(AnyActivity const&)> on_resume;
xbt::signal<void(AnyActivity const&)> on_this_resume;
+ inline static xbt::signal<void(AnyActivity&)> on_veto;
+ xbt::signal<void(AnyActivity&)> on_this_veto;
public:
/*! Add a callback fired when the activity completes (either normally, cancelled or failed) */
static void on_completion_cb(const std::function<void(AnyActivity const&)>& cb) { on_completion.connect(cb); }
void on_this_completion_cb(const std::function<void(AnyActivity const&)>& cb) { on_this_completion.connect(cb); }
- /*! Add a callback fired each time that the activity fails to start because of a veto (e.g., unsolved dependency or no
- * resource assigned) */
- static void on_veto_cb(const std::function<void(AnyActivity&)>& cb) { on_veto.connect(cb); }
/*! Add a callback fired when the activity is suspended */
static void on_suspend_cb(const std::function<void(AnyActivity const&)>& cb) { on_suspend.connect(cb); }
void on_this_suspend_cb(const std::function<void(AnyActivity const&)>& cb) { on_this_suspend.connect(cb); }
/*! Add a callback fired when the activity is resumed after being suspended */
static void on_resume_cb(const std::function<void(AnyActivity const&)>& cb) { on_resume.connect(cb); }
void on_this_resume_cb(const std::function<void(AnyActivity const&)>& cb) { on_this_resume.connect(cb); }
+ /*! Add a callback fired each time that the activity fails to start because of a veto (e.g., unsolved dependency or no
+ * resource assigned) */
+ static void on_veto_cb(const std::function<void(AnyActivity&)>& cb) { on_veto.connect(cb); }
+ void on_this_veto_cb(const std::function<void(AnyActivity&)>& cb) { on_this_veto.connect(cb); }
XBT_ATTRIB_DEPRECATED_v337("Please use on_suspend_cb() instead") static void on_suspended_cb(
const std::function<void(Activity const&)>& cb) { on_suspend.connect(cb); }
then Comm::on_completion is thrown in the kernel in CommImpl::finish.
*/
}
- void fire_on_veto() const override { on_veto(const_cast<Comm&>(*this)); }
void fire_on_suspend() const override { on_suspend(*this); }
void fire_on_this_suspend() const override { on_this_suspend(*this); }
void fire_on_resume() const override { on_resume(*this); }
void fire_on_this_resume() const override { on_this_resume(*this); }
+ void fire_on_veto() const override { on_veto(const_cast<Comm&>(*this)); }
+ void fire_on_this_veto() const override { on_this_veto(const_cast<Comm&>(*this)); }
public:
static void on_send_cb(const std::function<void(Comm const&)>& cb) { on_send.connect(cb); }
xbt::signal<void(Exec const&)> on_this_start;
void fire_on_completion() const override { on_completion(*this); }
void fire_on_this_completion() const override { on_this_completion(*this); }
- void fire_on_veto() const override { on_veto(const_cast<Exec&>(*this)); }
void fire_on_suspend() const override { on_suspend(*this); }
void fire_on_this_suspend() const override { on_this_suspend(*this); }
void fire_on_resume() const override { on_resume(*this); }
void fire_on_this_resume() const override { on_this_resume(*this); }
+ void fire_on_veto() const override { on_veto(const_cast<Exec&>(*this)); }
+ void fire_on_this_veto() const override { on_this_veto(const_cast<Exec&>(*this)); }
public:
#ifndef DOXYGEN
Io* do_start() override;
void fire_on_completion() const override { on_completion(*this); }
void fire_on_this_completion() const override { on_this_completion(*this); }
- void fire_on_veto() const override { on_veto(const_cast<Io&>(*this)); }
void fire_on_suspend() const override { on_suspend(*this); }
void fire_on_this_suspend() const override { on_this_suspend(*this); }
void fire_on_resume() const override { on_resume(*this); }
void fire_on_this_resume() const override { on_this_resume(*this); }
+ void fire_on_veto() const override { on_veto(const_cast<Io&>(*this)); }
+ void fire_on_this_veto() const override { on_this_veto(const_cast<Io&>(*this)); }
public:
enum class OpType { READ, WRITE };