MCPcopy Create free account
hub / github.com/COVESA/vsomeip / stop

Method stop

implementation/endpoints/src/endpoint_manager_base.cpp:49–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void endpoint_manager_base::stop() {
50 std::scoped_lock its_lock(mtx_);
51 if (!is_started_) {
52 return;
53 }
54 is_started_ = false;
55 ++lc_token_;
56 VSOMEIP_INFO_P << "Start endpoint flushing for client 0x" << hex4(get_client_id());
57 for (auto const& [_, ep] : local_server_endpoints_) {
58 ep->start_flushing();
59 }
60 for (auto const& [_, ep] : local_client_endpoints_) {
61 ep->start_flushing();
62 }
63 for (auto const& [_, ep] : pending_server_endpoints_) {
64 ep->stop(true); // never started -> nothing to flush
65 }
66 pending_server_endpoints_.clear();
67}
68
69[[nodiscard]] bool endpoint_manager_base::await_stopped(std::chrono::milliseconds _timeout) {
70 std::unique_lock its_lock{mtx_};

Calls 3

hex4Function · 0.85
start_flushingMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected