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

Method handle

implementation/endpoints/src/timer.cpp:100–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void timer::handle(boost::system::error_code const& _ec) {
101 if (_ec == boost::asio::error::operation_aborted) {
102 return;
103 }
104 std::unique_lock lock{mtx_};
105 if (state_ != state_e::STARTED) {
106 VSOMEIP_DEBUG_P << "Not executing the task: " << this;
107 return;
108 }
109 state_ = state_e::IN_TASK;
110 lock.unlock();
111 bool const restart = task_();
112 lock.lock();
113 if (state_ == state_e::IN_TASK_STARTED || (restart && state_ == state_e::IN_TASK)) {
114 start_unlocked();
115 return;
116 }
117 state_ = state_e::STOPPED;
118}
119}

Callers 1

start_unlockedMethod · 0.95

Calls 2

unlockMethod · 0.80
lockMethod · 0.80

Tested by

no test coverage detected