MCPcopy Create free account
hub / github.com/apache/arrow / ~SerialExecutor

Method ~SerialExecutor

cpp/src/arrow/util/thread_pool.cc:126–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126SerialExecutor::~SerialExecutor() {
127#ifndef ARROW_ENABLE_THREADING
128 GetSerialExecutorGlobalState()->all_executors.erase(this);
129#endif
130 auto state = state_;
131 std::unique_lock<std::mutex> lk(state->mutex);
132 if (!state->task_queue.empty()) {
133 // We may have remaining tasks if the executor is being abandoned. We could have
134 // resource leakage in this case. However, we can force the cleanup to happen now
135 state->paused = false;
136 lk.unlock();
137 RunLoop();
138 lk.lock();
139 }
140}
141
142int SerialExecutor::GetNumTasks() {
143 auto state = state_;

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45

Tested by

no test coverage detected