| 45 | void start() { app_->start(); } |
| 46 | |
| 47 | void stop() { |
| 48 | running_ = false; |
| 49 | blocked_ = true; |
| 50 | app_->clear_all_handler(); |
| 51 | stop_offer(); |
| 52 | condition_.notify_one(); |
| 53 | if (std::this_thread::get_id() != offer_thread_.get_id()) { |
| 54 | if (offer_thread_.joinable()) { |
| 55 | offer_thread_.join(); |
| 56 | } |
| 57 | } else { |
| 58 | offer_thread_.detach(); |
| 59 | } |
| 60 | app_->stop(); |
| 61 | } |
| 62 | |
| 63 | void offer() { |
| 64 | app_->offer_service(SAMPLE_SERVICE_ID, SAMPLE_INSTANCE_ID); |
no test coverage detected