We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7f22dd commit 7087685Copy full SHA for 7087685
1 file changed
src/utils.rs
@@ -109,9 +109,18 @@ where
109
{
110
let rt = &get_tokio_runtime().0;
111
let handle = rt.spawn(fut);
112
- Ok(wait_for_future(py, async {
113
- handle.await.map_err(to_datafusion_err)
114
- })???)
+ let abort_handle = handle.abort_handle();
+
+ match wait_for_future(py, async { handle.await.map_err(to_datafusion_err) }) {
115
+ Ok(result) => {
116
+ let result = result.map_err(PyDataFusionError::from)?;
117
+ result.map_err(PyDataFusionError::from)
118
+ }
119
+ Err(err) => {
120
+ abort_handle.abort();
121
+ Err(err.into())
122
123
124
}
125
126
pub(crate) fn parse_volatility(value: &str) -> PyDataFusionResult<Volatility> {
0 commit comments