Skip to content

Commit 6025d48

Browse files
committed
tmp
Signed-off-by: Onur Satici <[email protected]>
1 parent c3bf82a commit 6025d48

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

bench-vortex/src/lib.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)