From b74e3007241234c07792e369bb2f499c79bea2dd Mon Sep 17 00:00:00 2001 From: Khanh Tran Date: Fri, 3 Jul 2026 17:51:34 +0700 Subject: [PATCH] feat: allow experimental multithreading for macOS --- Cargo.toml | 1 + src/session.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 59c391fb..47b6b8a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,6 +54,7 @@ pkg-config = "0.3.14" [features] default = [] experimental = ["async-trait", "tokio"] +allow-multi-thread = [] libfuse = [] libfuse2 = ["libfuse"] libfuse3 = ["libfuse"] diff --git a/src/session.rs b/src/session.rs index 76261db3..c4e3ea7a 100644 --- a/src/session.rs +++ b/src/session.rs @@ -256,6 +256,7 @@ impl Session { let n_threads = config.n_threads.unwrap_or(1); + #[cfg(not(feature = "allow-multi-thread"))] if !cfg!(target_os = "linux") && n_threads != 1 { // TODO: check whether it works on macOS/FreeBSD and enable if it works. return Err(io::Error::other(