From 4badb8eb473897c65fffd3393afd8c97899a707d Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Tue, 29 Apr 2025 23:24:46 -0500 Subject: [PATCH] fuse_loop.cpp --- libfuse/lib/fuse_loop.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libfuse/lib/fuse_loop.cpp b/libfuse/lib/fuse_loop.cpp index a377bf60..0d330828 100644 --- a/libfuse/lib/fuse_loop.cpp +++ b/libfuse/lib/fuse_loop.cpp @@ -199,7 +199,11 @@ _calculate_thread_count(const int raw_thread_count_) thread_count = 4; if(raw_thread_count_ == 0) - thread_count = std::thread::hardware_concurrency(); + { + thread_count = std::thread::hardware_concurrency(); + if(thread_count > 8) + thread_count = 8; + } else if(raw_thread_count_ < 0) thread_count = (std::thread::hardware_concurrency() / -raw_thread_count_); else if(raw_thread_count_ > 0)