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

Method stop

examples/notify-sample.cpp:62–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 void start() { app_->start(); }
61
62 void stop() {
63 running_ = false;
64 blocked_ = true;
65 condition_.notify_one();
66 notify_condition_.notify_one();
67 app_->clear_all_handler();
68 stop_offer();
69 if (std::this_thread::get_id() != offer_thread_.get_id()) {
70 if (offer_thread_.joinable()) {
71 offer_thread_.join();
72 }
73 } else {
74 offer_thread_.detach();
75 }
76 if (std::this_thread::get_id() != notify_thread_.get_id()) {
77 if (notify_thread_.joinable()) {
78 notify_thread_.join();
79 }
80 } else {
81 notify_thread_.detach();
82 }
83 app_->stop();
84 }
85
86 void offer() {
87 std::scoped_lock its_lock(notify_mutex_);

Callers 1

mainFunction · 0.45

Calls 6

get_idFunction · 0.85
clear_all_handlerMethod · 0.80
detachMethod · 0.80
notify_oneMethod · 0.45
get_idMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected