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

Method wait

src/msg/async/AsyncMessenger.cc:800–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798}
799
800void AsyncMessenger::wait()
801{
802 {
803 std::unique_lock locker{lock};
804 if (!started) {
805 return;
806 }
807 while (!stopped)
808 stop_cond.wait(locker);
809 }
810 dispatch_queue.shutdown();
811 if (dispatch_queue.is_started()) {
812 ldout(cct, 10) << __func__ << ": waiting for dispatch queue" << dendl;
813 dispatch_queue.wait();
814 dispatch_queue.discard_local();
815 ldout(cct, 10) << __func__ << ": dispatch queue is stopped" << dendl;
816 }
817
818 // close all connections
819 shutdown_connections(false);
820 stack->drain();
821
822 ldout(cct, 10) << __func__ << ": done." << dendl;
823 ldout(cct, 1) << __func__ << " complete." << dendl;
824 started = false;
825}
826
827void AsyncMessenger::add_accept(Worker *w, ConnectedSocket cli_socket,
828 const entity_addr_t &listen_addr,

Callers

nothing calls this directly

Calls 4

discard_localMethod · 0.80
shutdownMethod · 0.45
is_startedMethod · 0.45
drainMethod · 0.45

Tested by

no test coverage detected