- /*! Add a callback fired when theactivity completes (either normally, cancelled or failed) */
- static void on_completion_cb(const std::function<void(Activity&)> cb) { on_completion.connect(cb); }
-
- void vetoable_start()
+ /*! Add a callback fired when the activity completes (either normally, cancelled or failed) */
+ static void on_completion_cb(const std::function<void(Activity const&)>& cb) { on_completion.connect(cb); }
+ /*! Add a callback fired when the activity is suspended */
+ static void on_suspended_cb(const std::function<void(Activity const&)>& cb) { on_suspended.connect(cb); }
+ /*! Add a callback fired when the activity is resumed after being suspended */
+ static void on_resumed_cb(const std::function<void(Activity const&)>& cb) { on_resumed.connect(cb); }
+
+ XBT_ATTRIB_DEPRECATED_v334("All start() are vetoable now. Please use start() ") void vetoable_start()
+ {
+ start();
+ }
+ void start()