File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -20,18 +20,17 @@ use crate::TokioRuntime;
2020use datafusion:: logical_expr:: Volatility ;
2121use pyo3:: prelude:: * ;
2222use std:: future:: Future ;
23- use std:: sync:: { Arc , OnceLock } ;
23+ use std:: sync:: OnceLock ;
2424use tokio:: runtime:: Runtime ;
2525
2626/// Utility to get the Tokio Runtime from Python
27- pub ( crate ) fn get_tokio_runtime ( ) -> Arc < TokioRuntime > {
28- static RUNTIME : OnceLock < Arc < TokioRuntime > > = OnceLock :: new ( ) ;
27+ pub ( crate ) fn get_tokio_runtime ( ) -> & ' static TokioRuntime {
28+ static RUNTIME : OnceLock < TokioRuntime > = OnceLock :: new ( ) ;
2929 RUNTIME
3030 . get_or_init ( || {
3131 let rt = TokioRuntime ( tokio:: runtime:: Runtime :: new ( ) . unwrap ( ) ) ;
32- Arc :: new ( rt )
32+ rt
3333 } )
34- . clone ( )
3534}
3635
3736/// Utility to collect rust futures with GIL released
You can’t perform that action at this time.
0 commit comments