From 9d94328cd67dce4d5c9796f53472d539be0f4073 Mon Sep 17 00:00:00 2001
From: mzntori <mzntori@proton.me>
Date: Fri, 29 Mar 2024 21:05:21 +0100
Subject: [PATCH] mark call that locks execbody from using that routine

---
 src/core/botmodules.rs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/core/botmodules.rs b/src/core/botmodules.rs
index f4dfb18..0dba823 100644
--- a/src/core/botmodules.rs
+++ b/src/core/botmodules.rs
@@ -1223,10 +1223,15 @@ impl Routine {
             mutlock.parent_params.curr_act = mutlock.self_act_ar.to_owned().unwrap();
         }
 
+        dbg!("before");
+
+        // `self_ar` is the routine you want to read in the execbody i think, but its used to call that execbody.
+        // So execbody waits for itself to finish.
         (self_ar.read().await.exec_body)(
             self_ar.read().await.parent_params.clone()
         ).await;
-        
+
+        dbg!("after");
         // (self.exec_body)(
         //     self.parent_params.clone()
         // ).await;