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

Method save_thread

implementation/thread_manager/src/thread_manager.cpp:41–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void thread_manager::save_thread(std::shared_ptr<std::thread> _thread) {
42 // Keep all dispatcher threads instead of handing over a single slot. Otherwise, if app_0 stores DT0 and then
43 // waits for app_1 to finish shutdown, app_1 can deadlock while trying to replace DT0 with DT1 under the same
44 // mutex. Preserving both entries lets interdependent applications complete shutdown without blocking the handover.
45 std::scoped_lock its_lock{this->thread_mutex_};
46 thread_vector_.push_back(_thread);
47}
48} // namespace vsomeip_v3

Callers 1

startMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected