MCPcopy Create free account
hub / github.com/ceph/ceph / drain

Method drain

src/msg/async/Stack.cc:191–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189};
190
191void NetworkStack::drain()
192{
193 ldout(cct, 30) << __func__ << " started." << dendl;
194 pthread_t cur = pthread_self();
195 pool_spin.lock();
196 C_drain drain(get_num_worker());
197 for (Worker* worker : workers) {
198 ceph_assert(cur != worker->center.get_owner());
199 worker->center.dispatch_event_external(EventCallbackRef(&drain));
200 }
201 pool_spin.unlock();
202 drain.wait();
203 ldout(cct, 30) << __func__ << " end." << dendl;
204}

Callers 2

shutdownMethod · 0.45
waitMethod · 0.45

Calls 5

lockMethod · 0.45
get_ownerMethod · 0.45
unlockMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected