From 679179840006b94283d5a11fe6c4212fc28d9600 Mon Sep 17 00:00:00 2001 From: Clayton Knittel <cknit1999@gmail.com> Date: Sat, 2 Nov 2024 12:05:04 -0700 Subject: [PATCH] jthread -> thread for macos compatibility. --- src/tracefile_executor.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tracefile_executor.cc b/src/tracefile_executor.cc index bdf97c5d..6ab87f1b 100644 --- a/src/tracefile_executor.cc +++ b/src/tracefile_executor.cc @@ -196,7 +196,7 @@ absl::Status TracefileExecutor::ProcessTracefileMultithreaded( absl::Mutex queue_mutex; std::deque<uint64_t> queued_idxs; - std::vector<std::jthread> threads; + std::vector<std::thread> threads; threads.reserve(options.n_threads); for (uint32_t i = 0; i < options.n_threads; i++) { @@ -215,6 +215,10 @@ absl::Status TracefileExecutor::ProcessTracefileMultithreaded( } }); } + + for (uint32_t i = 0; i < options.n_threads; i++) { + threads[i].join(); + } } return status;