WIP: Routine Unresponsive due to Deadlock #51
2 changed files with 13 additions and 0 deletions
|
@ -51,6 +51,7 @@ impl ExecBodyParams {
|
|||
}
|
||||
|
||||
pub async fn get_channel(&self) -> Option<Channel> {
|
||||
// pub fn get_channel(&self) -> Option<Channel> {
|
||||
|
||||
dbg!("Core > ExecBodyParams > GetChannels START");
|
||||
dbg!("!! [x] Document - After SUCCESS message was sent to chat");
|
||||
|
@ -63,6 +64,14 @@ impl ExecBodyParams {
|
|||
let curr_act = Arc::clone(&self.curr_act);
|
||||
let curr_act_lock = curr_act.read().await;
|
||||
|
||||
// Note : The below `curr_act.blocking_read()` is not possible. I get the following
|
||||
// during runtime in this areas
|
||||
/*
|
||||
thread 'tokio-runtime-worker' panicked at src\core\bot_actions.rs:66:38:
|
||||
Cannot block the current thread from within a runtime. This happens because a function attempted to block the current thread while the thread is being used to drive asynchronous tasks.
|
||||
*/
|
||||
// let curr_act_lock = curr_act.blocking_read();
|
||||
|
||||
dbg!("Core > ExecBodyParams > After Creating ExecBodyParams.current_act.read() Guard ");
|
||||
dbg!("!! [x] Document - After SUCCESS message was sent to chat");
|
||||
dbg!(">> BotActionAR - RwLock from botmodules.rs::929:46 - current_readers = 1 ");
|
||||
|
@ -105,6 +114,7 @@ impl ExecBodyParams {
|
|||
// let out = Some(r.read().await.channel.clone());
|
||||
|
||||
let guard = r.read().await;
|
||||
// let guard = r.blocking_read();
|
||||
|
||||
dbg!("ISSUE> Never makes it after the read guard");
|
||||
|
||||
|
|
|
@ -141,6 +141,7 @@ async fn countdown_chnl_v1(params : ExecBodyParams) {
|
|||
|
||||
// let parentmodule = params.get_parent_module().await;
|
||||
let module = params.get_module().await;
|
||||
// let channel = params.get_channel().await;
|
||||
let channel = params.get_channel().await;
|
||||
let routine_attr = vec![
|
||||
// RoutineAttr::RunOnce
|
||||
|
@ -359,6 +360,7 @@ async fn test3_body(params : ExecBodyParams) {
|
|||
|
||||
// let parentmodule = params.get_parent_module().await;
|
||||
let module = params.get_module().await;
|
||||
// let channel = params.get_channel().await;
|
||||
let channel = params.get_channel().await;
|
||||
let routine_attr = vec![
|
||||
RoutineAttr::RunOnce
|
||||
|
@ -436,6 +438,7 @@ async fn test3_body(params : ExecBodyParams) {
|
|||
// BotAction::C(_) | BotAction::L(_) => None ,
|
||||
// } ;
|
||||
|
||||
// let chnl = params.get_channel().await;
|
||||
let chnl = params.get_channel().await;
|
||||
dbg!("Custom > within Child Custom fn - after GetChannel");
|
||||
println!("{:?}",chnl);
|
||||
|
|
Loading…
Reference in a new issue