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

Method ~SerialExecutor

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45

Tested by

no test coverage detected