timsaucer commented on PR #1311:
URL: 
https://github.com/apache/datafusion-python/pull/1311#issuecomment-3582669718

   Further investigation. This diff
   
   ```diff
   diff --git a/src/utils.rs b/src/utils.rs
   index 6cc9626..251eb41 100644
   --- a/src/utils.rs
   +++ b/src/utils.rs
   @@ -84,7 +84,10 @@ where
                    tokio::select! {
                        res = &mut fut => break Ok(res),
                        _ = sleep(INTERVAL_CHECK_SIGNALS) => {
   -                        Python::attach(|py| py.check_signals())?;
   +                        Python::attach(|py| {
   +                            let threading = py.import("threading")?;
   +                            let _current_thread = 
threading.call_method0("current_thread")?;
   +                            py.check_signals()})?;
                        }
                    }
                }
   ```
   
   Then instead of getting a keyboard interrupt signal now gives a datafusion 
error wrapping a keyboard interrupt. I don't think it's important that the 
above code is calling the import or the call_method. I think the bit that's 
relevant is that the second call *takes time* within the attached state.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to