diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-02-02 21:42:00 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-02-02 21:42:00 +0100 |
commit | c3dc649badc6b93a0ec052c3a3eefbe5761c7213 (patch) | |
tree | cadf42eefd876ecde78f0189700012b0dcbc1c1d /include/erebos/frp.h | |
parent | c2df0381313ffe5e155b7dc3d6d4c7271a4b73a2 (diff) |
FRP: require lock when adding dependencies
Diffstat (limited to 'include/erebos/frp.h')
-rw-r--r-- | include/erebos/frp.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/erebos/frp.h b/include/erebos/frp.h index 28a8f63..72b5cc9 100644 --- a/include/erebos/frp.h +++ b/include/erebos/frp.h @@ -89,7 +89,7 @@ public: virtual ~BhvImplBase(); protected: - void dependsOn(shared_ptr<BhvImplBase> other); + void dependsOn(const BhvCurTime &, shared_ptr<BhvImplBase> other); void updated(const BhvCurTime &); virtual bool needsUpdate(const BhvCurTime &) const; virtual void doUpdate(const BhvCurTime &); @@ -251,9 +251,10 @@ private: template<typename A, typename B, typename C> BhvFun<A, C> operator>>(const BhvFun<A, B> & f, const BhvFun<B, C> & g) { + BhvCurTime ctime; auto impl = make_shared<BhvComp<A, B, C>>(f, g); - impl->dependsOn(f.impl); - impl->dependsOn(g.impl); + impl->dependsOn(ctime, f.impl); + impl->dependsOn(ctime, g.impl); return impl; } |