|
|
@@ -113,27 +113,6 @@ class process {
|
|
|
template<typename... Args>
|
|
|
void next(Args...) const noexcept {}
|
|
|
|
|
|
-protected:
|
|
|
- /**
|
|
|
- * @brief Terminates a process with success if it's still alive, otherwise
|
|
|
- * does nothing.
|
|
|
- */
|
|
|
- void succeed() noexcept {
|
|
|
- if(alive()) {
|
|
|
- current = state::succeeded;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @brief Terminates a process with errors if it's still alive, otherwise
|
|
|
- * does nothing.
|
|
|
- */
|
|
|
- void fail() noexcept {
|
|
|
- if(alive()) {
|
|
|
- current = state::failed;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
public:
|
|
|
/*! @brief Type used to provide elapsed time. */
|
|
|
using delta_type = Delta;
|
|
|
@@ -178,6 +157,26 @@ public:
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @brief Terminates a process with success if it's still alive, otherwise
|
|
|
+ * does nothing.
|
|
|
+ */
|
|
|
+ void succeed() noexcept {
|
|
|
+ if(alive()) {
|
|
|
+ current = state::succeeded;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @brief Terminates a process with errors if it's still alive, otherwise
|
|
|
+ * does nothing.
|
|
|
+ */
|
|
|
+ void fail() noexcept {
|
|
|
+ if(alive()) {
|
|
|
+ current = state::failed;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/*! @brief Stops a process if it's running, otherwise does nothing. */
|
|
|
void pause() noexcept {
|
|
|
if(current == state::running) {
|