diff --git a/src/vault/gear/activity.hpp b/src/vault/gear/activity.hpp index c4273f4f9..53a6e448e 100644 --- a/src/vault/gear/activity.hpp +++ b/src/vault/gear/activity.hpp @@ -241,6 +241,10 @@ namespace gear { { int rest; ///< alive while rest > 0 Instant dead; ///< alive while time < dead + + bool isDead (Time now) const { return dead <= now;} + bool isHold () const { return rest > 0; } + bool isFree (Time now) const { return not (isHold() or isDead(now)); } }; /** Time window to define for activation */ diff --git a/src/vault/gear/block-flow.hpp b/src/vault/gear/block-flow.hpp index 9ca875afc..f8b4d38c6 100644 --- a/src/vault/gear/block-flow.hpp +++ b/src/vault/gear/block-flow.hpp @@ -260,8 +260,8 @@ namespace gear { bool isAlive (Time deadline) { - /////////////////////////////////////////////OOO preliminary implementation ... should use the GATE-Activity itself - return this->deadline() > deadline; + return data_.condition.isHold() // NOTE: expected callback keeps alive + or not data_.condition.isDead (deadline); } size_t