MCPcopy Create free account
hub / github.com/apache/arrow / ThreadJoiner

Class ThreadJoiner

cpp/src/arrow/csv/column_decoder_test.cc:48–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46using ChunkData = std::vector<std::vector<std::string>>;
47
48class ThreadJoiner {
49 public:
50 explicit ThreadJoiner(std::shared_ptr<std::thread> thread)
51 : thread_(std::move(thread)) {}
52
53 ~ThreadJoiner() {
54 if (thread_->joinable()) {
55 thread_->join();
56 }
57 }
58
59 protected:
60 std::shared_ptr<std::thread> thread_;
61};
62
63template <typename Func>
64ThreadJoiner RunThread(Func&& func) {

Callers 1

RunThreadFunction · 0.85

Calls

no outgoing calls

Tested by 1

RunThreadFunction · 0.68