From c3dc649badc6b93a0ec052c3a3eefbe5761c7213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 2 Feb 2023 21:42:00 +0100 Subject: FRP: require lock when adding dependencies --- include/erebos/frp.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') 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 other); + void dependsOn(const BhvCurTime &, shared_ptr other); void updated(const BhvCurTime &); virtual bool needsUpdate(const BhvCurTime &) const; virtual void doUpdate(const BhvCurTime &); @@ -251,9 +251,10 @@ private: template BhvFun operator>>(const BhvFun & f, const BhvFun & g) { + BhvCurTime ctime; auto impl = make_shared>(f, g); - impl->dependsOn(f.impl); - impl->dependsOn(g.impl); + impl->dependsOn(ctime, f.impl); + impl->dependsOn(ctime, g.impl); return impl; } -- cgit v1.2.3