mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-21 15:36:31 -05:00
Fix thread pool destruction where threads don't explicitly exit themselves
This commit is contained in:
parent
dd7e9e2aa7
commit
766b923116
13 changed files with 49 additions and 5244 deletions
|
|
@ -6,7 +6,6 @@
|
|||
#include "fmt/core.h"
|
||||
#include "make_unique.hpp"
|
||||
#include "scope_guard.hpp"
|
||||
#include "syslog.h"
|
||||
#include "thread_pool.hpp"
|
||||
|
||||
#include "fuse_i.h"
|
||||
|
|
@ -26,6 +25,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cassert>
|
||||
|
|
@ -449,7 +449,9 @@ pin_threads(const std::vector<pthread_t> read_threads_,
|
|||
if(type_ == "R1PPSP")
|
||||
return ::pin_threads_R1PPSP(read_threads_,process_threads_);
|
||||
|
||||
syslog_warning("Invalid pin-threads value, ignoring: %s",type_.c_str());
|
||||
syslog(LOG_WARNING,
|
||||
"Invalid pin-threads value, ignoring: %s",
|
||||
type_.c_str());
|
||||
}
|
||||
|
||||
static
|
||||
|
|
@ -510,15 +512,16 @@ fuse_session_loop_mt(struct fuse_session *se_,
|
|||
|
||||
::pin_threads(read_threads,process_threads,pin_threads_type_);
|
||||
|
||||
syslog_info("read-thread-count=%d; "
|
||||
"process-thread-count=%d; "
|
||||
"process-thread-queue-depth=%d; "
|
||||
"pin-threads=%s;"
|
||||
,
|
||||
read_thread_count,
|
||||
process_thread_count,
|
||||
process_thread_queue_depth,
|
||||
pin_threads_type_.c_str());
|
||||
syslog(LOG_INFO,
|
||||
"read-thread-count=%d; "
|
||||
"process-thread-count=%d; "
|
||||
"process-thread-queue-depth=%d; "
|
||||
"pin-threads=%s;"
|
||||
,
|
||||
read_thread_count,
|
||||
process_thread_count,
|
||||
process_thread_queue_depth,
|
||||
pin_threads_type_.c_str());
|
||||
|
||||
::wait(se_,&finished);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue