File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -91,24 +91,17 @@ fn make_session() -> VortexSession {
9191 . unwrap_or ( RuntimeChoice :: Tokio )
9292 {
9393 RuntimeChoice :: Tokio => {
94- #[ cfg( feature = "tokio" ) ]
95- {
96- let handle = vortex:: io:: runtime:: tokio:: TokioRuntime :: current ( ) ;
97- let _ = RUNTIME_HANDLE . set ( handle. clone ( ) ) ;
98- VortexSession :: default ( ) . with_handle ( handle)
99- }
100- #[ cfg( not( feature = "tokio" ) ) ]
101- {
102- VortexSession :: default ( )
103- }
94+ let handle = vortex:: io:: runtime:: tokio:: TokioRuntime :: current ( ) ;
95+ drop ( RUNTIME_HANDLE . set ( handle. clone ( ) ) ) ;
96+ VortexSession :: default ( ) . with_handle ( handle)
10497 }
10598 #[ cfg( all( feature = "uring" , target_os = "linux" ) ) ]
10699 RuntimeChoice :: Uring => {
107100 use vortex:: io:: runtime:: uring:: PerCoreUringPool ;
108101 static URING_POOL : OnceLock < PerCoreUringPool > = OnceLock :: new ( ) ;
109102 let pool = URING_POOL . get_or_init ( || PerCoreUringPool :: new ( None ) ) ;
110103 let handle = pool. handle ( ) ;
111- let _ = RUNTIME_HANDLE . set ( handle. clone ( ) ) ;
104+ drop ( RUNTIME_HANDLE . set ( handle. clone ( ) ) ) ;
112105 VortexSession :: default ( ) . with_handle ( handle)
113106 }
114107 }
You can’t perform that action at this time.
0 commit comments