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

Method ~SerialExecutor

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45

Tested by

no test coverage detected