Skip to content

Commit

Permalink
bug: conditionally disable enable_io non-unix based systems
Browse files Browse the repository at this point in the history
  • Loading branch information
hntd187 committed Sep 13, 2024
1 parent 47376a6 commit f8625ed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/core/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,17 @@ fn io_rt(config: Option<&RuntimeConfig>) -> &Runtime {
let builder = builder.worker_threads(config.worker_threads);
let builder = if config.enable_io && config.enable_time {
builder.enable_all()
} else if config.enable_io && !config.enable_time {
builder.enable_io()
} else if !config.enable_io && config.enable_time {
builder.enable_time()
} else {
builder
};
#[cfg(unix)]
{
if config.enable_io && !config.enable_time {
builder = builder.enable_io();
}
}
builder
.thread_name(
config
Expand Down

0 comments on commit f8625ed

Please sign in to comment.